Back to Devexpress

MasterRowEmptyEventArgs.IsEmpty Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-masterrowemptyeventargs.md

latest5.4 KB
Original Source

MasterRowEmptyEventArgs.IsEmpty Property

Gets or sets a value specifying whether a detail contains data.

Namespace : DevExpress.XtraGrid.Views.Grid

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

csharp
public bool IsEmpty { get; set; }
vb
Public Property IsEmpty As Boolean

Property Value

TypeDescription
Boolean

true if the detail initially has no data; otherwise, false.

|

Remarks

Initially, the IsEmpty property value indicates that data is actually present within the detail. If the detail contains data, the IsEmpty property’s initial value is false. Otherwise, the property initially returns true.

Set the IsEmpty property to true to indicate that the processed detail has no data.

The following code snippets (auto-collected from DevExpress Examples) contain references to the IsEmpty property.

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.

winforms-grid-vertically-align-detail-views/CS/DetailsUnderEachOther/Form1.cs#L41

csharp
private void gvMaster_MasterRowEmpty(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowEmptyEventArgs e) {
    e.IsEmpty = false;
}

winforms-grid-master-detail-entity-framework/CS/Entities/Form1.cs#L19

csharp
Product p = (Product)gridView1.GetRow(e.RowHandle);
    e.IsEmpty = p.Order_Details.Count == 0;
}

winforms-grid-load-refresh-detail-data-from-database/CS/WindowsApplication297/Form1.cs#L73

csharp
private void gridView1_MasterRowEmpty(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowEmptyEventArgs e) {
    e.IsEmpty = false;
}

winforms-grid-master-detail-async-load-detail-data/CS/WindowsFormsSample/Form1.cs#L37

csharp
private void gridView1_MasterRowEmpty(object sender, MasterRowEmptyEventArgs e) {
    e.IsEmpty = false;
}

winforms-grid-vertically-align-detail-views/VB/DetailsUnderEachOther/Form1.vb#L43

vb
Private Sub gvMaster_MasterRowEmpty(ByVal sender As Object, ByVal e As MasterRowEmptyEventArgs)
    e.IsEmpty = False
End Sub

winforms-grid-master-detail-entity-framework/VB/Entities/Form1.vb#L21

vb
Dim p As Product = CType(gridView1.GetRow(e.RowHandle), Product)
    e.IsEmpty = p.Order_Details.Count = 0
End Sub

winforms-grid-load-refresh-detail-data-from-database/VB/WindowsApplication297/Form1.vb#L73

vb
Private Sub gridView1_MasterRowEmpty(ByVal sender As Object, ByVal e As MasterRowEmptyEventArgs)
    e.IsEmpty = False
End Sub

winforms-grid-master-detail-async-load-detail-data/VB/WindowsFormsSample/Form1.vb#L39

vb
Private Sub gridView1_MasterRowEmpty(ByVal sender As Object, ByVal e As MasterRowEmptyEventArgs) Handles gridView1.MasterRowEmpty
    e.IsEmpty = False
End Sub

See Also

AllowExpandEmptyDetails

SmartDetailExpandButtonMode

MasterRowEmptyEventArgs Class

MasterRowEmptyEventArgs Members

DevExpress.XtraGrid.Views.Grid Namespace