Reputation: 31
The client wants to be able to type a letter and have the system scroll the DataGridView such that the first row with a cell that matched the letter will scroll to the top of the DataGridView
Any suggestions will be appreciated
Upvotes: 3
Views: 782
Reputation: 38200
I am not sure how you will be able to lookup efficiently for the getting the row which matches the letter you have. But you can have a look at these properties which would help you setting the focus
dataGridView1.FirstDisplayedScrollingRowIndex //set the rowindex
In case you have a horizontal scroll also set this value
dataGridView1.FirstDisplayedScrollingColumnIndex
I believe you would be looping through, so you should be able to set these values and again set the CurrentCell as the one you found.
Hope this helps
Upvotes: 4