GridView.MasterRowEmpty Event
Enables you to specify whether a particular detail is empty. This event is in effect if the GridOptionsDetail.AllowExpandEmptyDetails option is set to false.
Namespace: DevExpress.XtraGrid.Views.Grid
Assembly: DevExpress.XtraGrid.v21.2.dll
NuGet Packages: DevExpress.Win.Design, DevExpress.Win.Grid
Declaration
Event Data
The MasterRowEmpty event's data class is MasterRowEmptyEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
IsEmpty | Gets or sets a value specifying whether a detail contains data. |
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 MasterRowEmpty event is only in effect if the GridOptionsDetail.AllowExpandEmptyDetails option is set to false. It is raised for each master-detail relationship for each master row within the View. The event allows you to complete the following tasks:
- Mark a detail View that contains data as “empty” by setting the event’s IsEmpty parameter to true.
- Mark a detail View that does not contain data as “not empty” by setting the event’s IsEmpty parameter to false. In this case, data for this View needs to be provided via the GridView.MasterRowGetChildList event.
An end-user will not be able to access empty detail Views, either with detail tabs, or with detail tooltips (the visibility of these elements is specified by the event’s IsEmpty parameter).
Refer to the Working with Master-Detail Relationships in Code topic for information on supplying detail data manually.