Retain Gridview position (SelectedItem) after a refresh
I am using a Gridview in ASP.NET 2.0 with Visual Basic 2005. The gridview is composed of drop down lists, textboxes and labels. Each row contains the contents of one row from a table in a database. It is displayed so the user can edit or delete the row or rows.
After the initial criteria is entered, the gridview is populated with data meeting the basic criteria. Then the user selects the specific row they wish to edit by clicking "Select" on the left most column of the row.
When the "Select" is clicked, the gridview refreshes and the row they selected has changed color so it is easy to identify. However, after the refresh the gridview displays as it originally did with the original first row at the top of the list.
If there are 200 rows and the user selects row 190, after the refresh the user has to scroll all the way down to row 190 again in order to work on it. What I would like is for the row to display in the active window so the user is not forced to scroll down to find it.
How can this be accomplished? it seem like it should be simple... bit I am completely flummoxed.