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. Select checked rows from Datagrid

Select checked rows from Datagrid

Scheduled Pinned Locked Moved ASP.NET
question
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.
  • V Offline
    V Offline
    VanithaVasu
    wrote on last edited by
    #1

    Hai, I am using a datagrid which contains CheckBox in each row. And During Runtime How can i get all the selected rows without using the Loop structure.

    VanithaVasu

    V V 2 Replies Last reply
    0
    • V VanithaVasu

      Hai, I am using a datagrid which contains CheckBox in each row. And During Runtime How can i get all the selected rows without using the Loop structure.

      VanithaVasu

      V Offline
      V Offline
      VenkataRamana Gali
      wrote on last edited by
      #2

      tell me exactly what was u r scenario & looking for ?

      GV Ramana

      1 Reply Last reply
      0
      • V VanithaVasu

        Hai, I am using a datagrid which contains CheckBox in each row. And During Runtime How can i get all the selected rows without using the Loop structure.

        VanithaVasu

        V Offline
        V Offline
        vidyasankar 0
        wrote on last edited by
        #3

        hai, refer below code... CheckBox chkbox = new CheckBox(); foreach(DataGridItem item in gridsearch.Items ) { chkbox=(CheckBox)item.FindControl("chkbox"); if(chkbox.Checked) { print some value - Response.Write(item.Cells[2].Text); } } regards, vidyasankar N

        Think Big

        V 1 Reply Last reply
        0
        • V vidyasankar 0

          hai, refer below code... CheckBox chkbox = new CheckBox(); foreach(DataGridItem item in gridsearch.Items ) { chkbox=(CheckBox)item.FindControl("chkbox"); if(chkbox.Checked) { print some value - Response.Write(item.Cells[2].Text); } } regards, vidyasankar N

          Think Big

          V Offline
          V Offline
          VanithaVasu
          wrote on last edited by
          #4

          I Know this method too... I want to know the thing is Is there anyother method to find the selected rows without using the for loop. I ask this question because i was asked for this question in an interview. So If anybody know please let me know the solution.

          VanithaVasu

          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