DataGridView: Scrolling to Selected row

  • Thread starter Thread starter Jayson Go - Old Account
  • Start date Start date
J

Jayson Go - Old Account

Guest
(.NET 2.0 Framework)
In the DataGridView control, I have programmatically selected a row thats currently not displayed in the grid. However, the grid does not seem to scroll to the selected row automatically, and there doesnt seem to be a way to scroll programmatically to any row, let alone the selected row.

Some details:
- my DataGridView is running under VirtualMode
- I first execute DataGridView.ClearSelection() then DataGridView.Rows[index].Selected = true
- I have traced the rows that arent displayed and the pertinent properties are:
DataGridViewRow.Visible = true
DataGridViewRow.Displayed = false

I see no functions under DataGridView or DataGridViewRow to force the DataGridView to force a scroll. Can anyone confirm this? And is there a work around?

Continue reading...
 
Back
Top