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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Scroll bars in datagrid 2
Top visible row in datagrid? 2
Get Viewing Row in DataGrid 1
DataGrid question 1
Datagrid 2
Datagrid 2
datagrid scroll bars 1
Scrolling a Datagrid with code 3

Back
Top