Automatic view of a selected Row

Asked

Viewed 111 times

1

I have a spreadsheet where I can upload numerous records, and I also have a field to search for any record. When I look for a particular record and the system finds this ROW it is automatically selected!

Currently, when I search for the record and the system selects the ROWI need to manually scroll the scrollbar up to the ROW selected !

I wish as soon as one ROW if selected the spreadsheet jumps to where is this particular record that was selected.

inserir a descrição da imagem aqui

  • You just need to give one focus in gridview, that’s it ?

1 answer

2

If your datagridview is using a BindingSource, you can use the index of row found by your search on the property Position. (Add this line after finding the record)

Automatically the focus will be moved to the found line even if you need to use the scrollbar.

produtosBindingSource.Position = index;

Browser other questions tagged

You are not signed in. Login or sign up in order to post.