DataGridView Control

  • Thread starter Thread starter Samuel
  • Start date Start date
S

Samuel

Hi

I wonder if there is a way of knowing how much a list is scrolled down.
I would like to refresh the control (clear all rows and add them again) and
have reset to the current position

Thank you,
Samuel
 
SurturZ said:
Listbox.TopIndex is the property you are after.

According to the subject line the OP wants to determine the position in a
datagridview control.

Maybe the 'DataGridView.FirstDisplayedScrollingRowIndex' property can be
used to solve the problem.

If this doesn't solve the problem, it's possible (although undocumented) to
access the scrollbar directly:

\\\
Dim VScroll As VScrollBar = _
DirectCast(Me.DataGridView1.Controls(1), VScrollBar)
....
///

'Controls(0)' contains the horizontal scrollbar.
 
Back
Top