Originally Posted by ysfkay
Hello every one, I need help... I have a gridview control and I want to make the entire rows selectable, that is all the colums in a row,I do not want to use a select link or button.not only that, I want to pass the value of the id field of the selected row in a query string. I know how to do this if I were to use a select link in each row,but this it isn't what I want. Thank you
I think I can help though I'm not sure how "I want to make the entire rows selectable, that is all the colums in a row" is different from selecting a row. So let me back up a step and maybe it will take care of your question or you can provide more details.
When you create a GridView, it's because you want to display and / or edit information, so you've got the right tool for that job. Now, it sounds like you want to be able to 1) select the row and 2) pass it's ID into the query string so you can operate on the row on another page.
I think all you need to do is grab the (this is from memory mind you) Item_Selected(??) event handler and execute something like this...
Grab the id of the row from the GridView
Create a string for the URL and populate the query parameter from the variable which holds the ID
Call a response.redirect to the variable which holds the URL
Then you can pick the query parameter up on the redirected page and proceed from there.