DataGridView - Scroll to Specific Item

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

Please first to submit.