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