Skip to main content

GridView.MasterRowExpanding Event

Enables you to control whether particular detail clones can be displayed.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v24.1.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

[DXCategory("MasterDetail")]
public event MasterRowCanExpandEventHandler MasterRowExpanding

Event Data

The MasterRowExpanding event's data class is MasterRowCanExpandEventArgs. The following properties provide information specific to this event:

Property Description
Allow Gets or sets a value specifying whether the current operation is allowed.
RelationIndex Gets the relation index that identifies the affected detail. Inherited from CustomMasterRowEventArgs.
RowHandle Gets the handle of the currently processed master row in the current View. Inherited from CustomMasterRowEventArgs.

Remarks

The MasterRowExpanding event is raised when before expanding a master row or before switching between detail clones. The master row can be identified using the CustomMasterRowEventArgs.RowHandle parameter. The CustomMasterRowEventArgs.RelationIndex parameter identifies the detail clone which is about to be opened. If you need to prevent the detail from being displayed, set the MasterRowCanExpandEventArgs.Allow parameter to false.

Please refer to the Master-Detail Relationships topic for additional information.

See Also