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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. how to access the checkbox control in nested gridview

how to access the checkbox control in nested gridview

Scheduled Pinned Locked Moved ASP.NET
helptutorial
1 Posts 1 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.
  • S Offline
    S Offline
    SharonRao
    wrote on last edited by
    #1

    hello all, I have master detail gridview master gridview company and detail gridview is peoplelist, i wanted to implement multiple selection in detail gridview using checkboxes. But i am not sure how to get the datakey (in mycase personid) of all the rows in which the checkbox is selected. I need to do insert operation using these personid's can anyone point me in the right direction. Cheers, Shilpa. I am trying to access the child gridview in this method but not able to do so GridView People = grdCompanyPeople.FindControl("grdPersons")as GridView for (int i = 0; i < People.Rows.Count; i++) { GridViewRow Singlerow = People.Rows[i]; bool isChecked = ((CheckBox)Singlerow.FindControl("chkSelect")).Checked; if (isChecked == true) { str.Append(People.DataKeys[Singlerow.RowIndex]["PersonID"].ToString() + ","); } } // prints out the result Response.Write(str.ToString());

    Thanks in Advance for your help. Best Regards

    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