I have an point that I need to pass AutoScrollPosition like this:
pt = new Point(innerPanel.AutoScrollPosition.X, innerPanel.AutoScrollPosition.Y);
but the problem is DataGridView doesn’t have AutoScrollPosition, only AutoScrollOffset. When I tried:
pt = new Point(dataGridView1.AutoScrollOffset.X, dataGridView1.AutoScrollOffset.Y);
nothing happens. Any suggestions? Thanks!
According to AutoScrollOffset Documentation :
So just Do this :
You might also want to try this :