Selecting a row in a gridview

K

katmagic

I have the SelectedValue of a gridview, how do I select the row based on
that information?
 
M

Mark Rae [MVP]

I have the SelectedValue of a gridview, how do I select the row based on
that information?

Please clarify a bit more by what you mean by 'select'...

Do you mean you just want to display the row differently, maybe with a
different background colour?

Or do you want to edit the row?

Or do you want to do something else based on the values of one or more of
the row's cells...?
 
K

katmagic

Sorry not very clear. I have some controls that are populated based on the
value of the selected row of a gridview. When the user modifies those
controls it causes a postback so I lose the originally selected row of the
gridview. I want to be able to return the user to the row they had
selected, so before the postback occurs, I grab the value of the currently
selected row. Now I want to return the user to that row, how do I do that?
I hope that makes better sense, thank you so much for your help. Something
like gv.SelectedIndex = ???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top