Can I select a row in a DataGrid and show that row?

D

Doru Roman

Hi,

I use a DataGrid and I have a search on a specific value in a dataset. Once
I find the row that contains the value, I would like that row to be visible
in the datagrid window, in other words, to scroll up to that particular row
to be the first or last in the visible part of the grid.

Any suggestions please?
Thanks,
Doru
 
T

Tim Wilson

You can set the CurrentRowIndex property to ensure that the row is visible
and you can use the Select method to select (highlight) the row.
 
D

Doru Roman

Thanks Tom,
I used CurrentRowIndex too but because of some other bad code it did not
work. Now it does.
 

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

Top