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. DataGrid Select Row

DataGrid Select Row

Scheduled Pinned Locked Moved ASP.NET
questiondatabasecomtoolshelp
2 Posts 2 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.
  • R Offline
    R Offline
    Richard Lewis
    wrote on last edited by
    #1

    Hi All, I am using the DataGrid control to display a list of items from the database. I want to know the following: How can I select a row in the DataGrid without using checkboxes? After selecting the row how do I capture a value contained in that row? (For a sample of what I want, this is the same behaviour as can be seen at http://www.codeproject.com/script/comments/forums.asp[^] Click one of the Forums that appear on this link. The entire row gets selected. ) Any help will be greatly appreciated:confused: RL

    O 1 Reply Last reply
    0
    • R Richard Lewis

      Hi All, I am using the DataGrid control to display a list of items from the database. I want to know the following: How can I select a row in the DataGrid without using checkboxes? After selecting the row how do I capture a value contained in that row? (For a sample of what I want, this is the same behaviour as can be seen at http://www.codeproject.com/script/comments/forums.asp[^] Click one of the Forums that appear on this link. The entire row gets selected. ) Any help will be greatly appreciated:confused: RL

      O Offline
      O Offline
      OMalleyW
      wrote on last edited by
      #2

      EDIT: The code that I put in here is not displaying correctly. Email me and I will send you an example later today: 1) make a table that will serve as a header for your datagrid 2)Make the datagrid with only one column. In that column put a table that has the values you wish to display Make sure that you tell it not to show either the header or footer for the datagrid. Now add thisOk, So now you have a datagrid that has one column, in that column you have a div that will highlight on mouse over. How do you get the values on click of the row? Because this will be handled on the client you will need to create an onclick event fo

      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