ColumnView.MoveLast() Method
Moves focus to the last data record.
Namespace: DevExpress.XtraGrid.Views.Base
Assembly: DevExpress.XtraGrid.v24.2.dll
NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation
#Declaration
#Remarks
If the last data record (row or card) is invisible on screen, calling the MoveLast method scrolls the View to make the record visible. Note that in Grid Views, the last data row may be hidden within a collapsed group. In such cases, necessary groups are expanded to make the row visible.
End-users can focus the last data record by pressing the “Last” button of the embedded data navigator or pressing CTRL+END while the View has focus.
If you need to move focus to the last visible row (row, group row, or card), use the ColumnView.MoveLastVisible method.
In Instant Feedback Mode, the MoveLast method when called, does nothing while a grid is loading its data for the first time. If you need to move focus to the last record on the grid’s initialization, handle the ColumnView.RowLoaded event as follows:
using DevExpress.XtraGrid.Views.Base;
bool needMoveLastRow = true;
private void gridView1_RowLoaded(object sender, RowEventArgs e) {
ColumnView view = sender as ColumnView;
if (needMoveLastRow) {
needMoveLastRow = false;
view.MoveLast();
}
}
Note
Detail pattern Views do not contain data and they are never displayed within Xtra
- Grid
Control. - returns the top most View in a grid;Main View - Grid
Control. - returns the focused View;Focused View - Grid
Control. - returns the currently maximized View;Default View - the sender parameter of View specific events;
- Grid
View. - returns a detail clone View for a specific master row.Get Detail View