Datagrid Scrolling

  • Thread starter Thread starter Charlie Farrier
  • Start date Start date
C

Charlie Farrier

In a Forms Datagrid, how do I scroll in code to a row that
is not currently visible, to bring it into view?
 
use the CurrentRowIndex property of the Datagrid.
This will select the row and scroll the grid to show the row.
 
Thanks.

I now realize the reason it was not working for me was
that the Datagrid was set to ReadOnly. For some reason,
in that state, the DataGrid scrolls to the top after
setting the CurrentRowIndex. The "cursor" of the datagrid
is on the correct record, however.
 
Back
Top