.net datagridview refresh

I have a datagridview that I need to refresh sometimes.  When this happens, the grid clears, then refreshes, and the selected row goes back to the top row.  How can I save the grids sorting, reselect the row, and rescroll to the row after a refresh?

I don't want the user to have to manually select the same record each time.
Who is Participating?
Melih SARICAConnect With a Mentor IT ManagerCommented:
before refresh, get datagridview sortedcolumn and sort order property values and also selectedrow..
then after refresh sort by the values and set selected row again
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.