Skip to main content
A newer version of this page is available. .

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.v19.2.dll

Declaration

[DXCategory("MasterDetail")]
public event MasterRowEmptyEventHandler MasterRowEmpty

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 perform 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.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the MasterRowEmpty event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also