Displaying X row in my Win datagrid

  • Thread starter Thread starter VM
  • Start date Start date
V

VM

When I attach my datagrid to a source (table), it displays the row 1 as the
first visible row in my grid. Instead, I'd like to display row 400 as the
first (plus all the subsequent rows). I can still scroll to all 399 previous
rows, but I don't want to make them visible.

Thanks.
 
Hi
You can use the method dataGrid1.Select(400) which select this row for you
and display it ( being selected ) when the dataGrid is loaded with data.
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
 
It selects it but doesn't make it visible in the grid. I still have to
scroll to row 400 in order to view it.
 
to move to the row that you want , add this line of code
dataGrid1.CurrentRowIndex=(400);
in addition to the line that we discussed before
dataGrid1.Select(400);
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
 

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

Back
Top