Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Javascript Problem

Javascript Problem

Scheduled Pinned Locked Moved ASP.NET
csharpjavascriptasp-nethelptutorial
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    monika_vasvani
    wrote on last edited by
    #1

    Hi I have datagrid in asp.net. which contains two columns.And one button name is "save" on my form. My first column is template column which is checkbox. Now my Problem is:when i click on save button,I want to check at least one checkbox has to checked. That's why i want javascript on my save button.How to write javascript for that? I know hoe to call javascript but how to write means how to take checkbox in javascript? Thanks monika

    T K 2 Replies Last reply
    0
    • M monika_vasvani

      Hi I have datagrid in asp.net. which contains two columns.And one button name is "save" on my form. My first column is template column which is checkbox. Now my Problem is:when i click on save button,I want to check at least one checkbox has to checked. That's why i want javascript on my save button.How to write javascript for that? I know hoe to call javascript but how to write means how to take checkbox in javascript? Thanks monika

      T Offline
      T Offline
      thomas_joyee
      wrote on last edited by
      #2

      This article serves your exact problem. http://www.codeproject.com/aspnet/DataGirdCheckBox.asp Hope this will help you

      Thomas

      M 1 Reply Last reply
      0
      • T thomas_joyee

        This article serves your exact problem. http://www.codeproject.com/aspnet/DataGirdCheckBox.asp Hope this will help you

        Thomas

        M Offline
        M Offline
        monika_vasvani
        wrote on last edited by
        #3

        Hi Thanks for yr help. But i think u r not getting my exact problem. I have datagrid which has first column as template column as checkbox. Private Sub dg_diagnosis_ItemCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dg_diagnosis.ItemCreated If e.Item.ItemType = ListItemType.AlternatingItem Or e.Item.ItemType = ListItemType.Item Then Dim chk As New HtmlInputCheckBox chk.ID = "chk" id = chk.ID e.Item.Cells(0).Controls.Add(chk) Me.img_save.Attributes.Add("OnClick", "CheckList1();") End If End Sub can u say me how to use this checkbox in javascript? Hope u getting my question. Thnaks monika

        1 Reply Last reply
        0
        • M monika_vasvani

          Hi I have datagrid in asp.net. which contains two columns.And one button name is "save" on my form. My first column is template column which is checkbox. Now my Problem is:when i click on save button,I want to check at least one checkbox has to checked. That's why i want javascript on my save button.How to write javascript for that? I know hoe to call javascript but how to write means how to take checkbox in javascript? Thanks monika

          K Offline
          K Offline
          kalyan_vb
          wrote on last edited by
          #4

          If you still need the solution I can post it.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups