Tim
Tim

Reputation: 8921

DevExpress XtraGrid set FocusedRowHandle and then scroll focused row into view?

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;

Upvotes: 6

Views: 15810

Answers (1)

DevExpress Team
DevExpress Team

Reputation: 11376

Use the GridView.MakeRowVisible method for this purpose.

Upvotes: 14

Related Questions