DataGridView - Scroll to Specific Item

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!
Answered
0
0

I see that DataGridView’s have a FirstDisplayedRowIndex property, but is read only…

 

Is there a way to scroll to a specific row in the datagridview?

 

Thanks,

Levie

  • You must to post comments
Best Answer
0
0

Hi Levie,

FirstDisplayedRowIndex is readonly for now, but you can use ScrollCellIntoView property that allows to specify a column and row to scroll to.

Best regards
Frank

  • Levie Rufenacht
    Worked perfect, Thanks!
  • Levie Rufenacht
    This works for one of my applications, but on another one whenever I change the datasource the selected index always changes back to 0 and resets my vertical scroll position. Is there any way to retain the specified scroll position and selectedindex after the datasource changes? Thanks, Levie
  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Attachment
File Name Size
There are currently no files uploaded.
Maximum number of files 1, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json