3

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

David Hall
  • 32,624
  • 10
  • 90
  • 127
Alex D.
  • 31
  • 1

1 Answers1

4

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

David Hall
  • 32,624
  • 10
  • 90
  • 127
V4Vendetta
  • 37,194
  • 9
  • 78
  • 82