How to save scrollbar position?

Asked

Viewed 388 times

1

I would like to get the position of the scroll bar DataGridView, so that after giving a refresh, remain in the same position.

1 answer

3


Come on, man, so you can get the scroll position

 int currentPositionScroll = datagridView.FirstDisplayedScrollingRowIndex;

and here is for you to set the value you want for the scroll

datagridView.FirstDisplayScrollingRowIndex = currentPositionScroll

I hope it helps.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.