ColumnView.BeforeLeaveRow Event
Enables you to prevent row focus changes.
Namespace: DevExpress.XtraGrid.Views.Base
Assembly: DevExpress.XtraGrid.v24.2.dll
NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation
#Declaration
[DXCategory("Action")]
public event RowAllowEventHandler BeforeLeaveRow
#Event Data
The BeforeLeaveRow event's data class is RowAllowEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Allow | Gets or sets a value specifying whether the current operation is allowed. |
Row |
Gets the row’s handle (position). For the Column |
#Remarks
The BeforeLeaveRow event is raised each time a row is about to lose focus. The row can be identified by the RowEventArgs.RowHandle parameter. If you need to prevent row focus changes, set the RowAllowEventArgs.Allow parameter to false.
If you only need to respond to row focus changes, handle the ColumnView.FocusedRowChanged event.
The BeforeLeaveRow event does not allow you to prevent focus movement away from the New Item Row.