Restore Selected Item in Grid after refresh of Grid

Lets say I have a grid...a user clicks on a ROW and a Modal form pops up...then they make some changes and return to the Grid. What is the quickest way to put the Grid Index pointer on the same row they left...here is the catch, the grid refreshes it's data whenever the modal form closes, and more records may be in the grid then when the user opened the modal form...therefore I cannot simply rely on the ROW NUMBER because the records position may have moved within the grid...I can capture the ID of the record selected...but how do you restore based on this? Do you have to loop through the entire grid to get the new row number and then use...

dgMainGrid.CurrentRowIndex = intRowNumberOfID
LVL 7
natlozAsked:
Who is Participating?
 
bramsquadConnect With a Mentor Commented:
yes, if that data is totally different you will need to filter through the data to find your specific ID number.

check this question out

http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21105283.html

~b
0
All Courses

From novice to tech pro — start learning today.