6

I have an XtraGrid with ~500 rows in it. I can set the FocusedRowHandle to, say, row 245. But is there a method that will scroll that now-focused row into view if it's currently not visible?

DevExpress.XtraGrid.Views.Base.ColumnView vw;
vw = MyGrid.DefaultView as DevExpress.XtraGrid.Views.Base.ColumnView;
vw.FocusedRowHandle = 245;
Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
Tim
  • 8,669
  • 31
  • 105
  • 183

1 Answers1

14

Use the GridView.MakeRowVisible method for this purpose.

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
DevExpress Team
  • 11,338
  • 2
  • 24
  • 23
  • If the data source adds another 10 rows, I scroll to the end with `grid.MakeRowVisible(grid.DataRowCount - 1);` but this "*jumps*" to the end. Is there a way to make it scroll smoothly? – Anthony May 24 '13 at 01:46