How to save scrollbar position?

1

I would like to get the scrollbar position of DataGridView , so after giving a refresh , continue in the same position.

    
asked by anonymous 26.02.2015 / 14:50

1 answer

3

So, man, for you to get the position of the scroll

 int currentPositionScroll = datagridView.FirstDisplayedScrollingRowIndex;

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

datagridView.FirstDisplayScrollingRowIndex = currentPositionScroll

I hope it helps.

    
27.02.2015 / 21:06