natloz
asked on
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
dgMainGrid.CurrentRowIndex
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.