Back to Devexpress

GridView.MasterRowExpanding Event

windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridview-b140fd74.md

latest3.7 KB
Original Source

GridView.MasterRowExpanding Event

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

Namespace : DevExpress.XtraGrid.Views.Grid

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

csharp
[DXCategory("MasterDetail")]
public event MasterRowCanExpandEventHandler MasterRowExpanding
vb
<DXCategory("MasterDetail")>
Public Event MasterRowExpanding As MasterRowCanExpandEventHandler

Event Data

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

PropertyDescription
AllowGets or sets a value specifying whether the current operation is allowed.
RelationIndexGets the relation index that identifies the affected detail. Inherited from CustomMasterRowEventArgs.
RowHandleGets 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

MasterRowCollapsed

MasterRowCollapsing

MasterRowExpanded

SetMasterRowExpandedEx(Int32, Int32, Boolean)

Master-Detail Relationships

GridView Class

GridView Members

DevExpress.XtraGrid.Views.Grid Namespace