troubleshooting Question

Retain Gridview position (SelectedItem) after a refresh

Avatar of NorthReno
NorthRenoFlag for United States of America asked on
.NET ProgrammingASP.NETVisual Basic.NET
5 Comments1 Solution910 ViewsLast Modified:
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.

Thanks in advance
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros