I setup my gridview to handle the edit,delete, and insert operations correctly. My grid also supports paging and sorting. My question is how to highlight and go to the newly inserted row in my grid?
A:
Hi John
If the newly inserted row is always going to be the last row in your grid (or the first, for instance), then you could just get the grid to select either the first or the last row after an insert is performed.
My advice (if this method is appropriate) would be to execute your selection code right after you've performed the rebind after the insert. If you can't do that, for any reason, then when the new row is inserted, store a value in the Session object to indicate that a new row has been added (eg. Session("RowAdded") = True) and check for it on your grid's data binding events.
HTH,
Richard.
Richard
2010-05-05 08:15:07