Back to Devexpress

DataViewBase.ShowEmptyText Property

wpf-devexpress-dot-xpf-dot-grid-dot-dataviewbase-b642e09c.md

latest2.9 KB
Original Source

DataViewBase.ShowEmptyText Property

Gets or sets whether to show the No Records text when the GridControl‘s data area displays no records.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

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

Property Value

TypeDefaultDescription
Booleanfalse

true to show the No Records text; otherwise, false.

|

Remarks

Set the ShowEmptyText property to true to show the No Records text in the following cases:

  • The GridControl‘s data source is not specified or empty.

  • A filter/search query has no results.

Note

In master-detail mode, the No Records text is displayed in the master grid only.

Customize Text

View Example: Display Text in a Grid With No Records

Tip

Topics :

The following code sample changes the No Records Found text:

xaml
<dxg:GridControl.View>
    <dxg:TableView ShowEmptyText="True">
        <dxg:TableView.RuntimeLocalizationStrings>
            <dxg:GridRuntimeStringCollection>
                <dxg:RuntimeStringIdInfo Id="NoRecordsFound" Value="Custom text"/>
            </dxg:GridRuntimeStringCollection>
        </dxg:TableView.RuntimeLocalizationStrings>
    </dxg:TableView>
</dxg:GridControl.View>

See Also

DataViewBase Class

DataViewBase Members

DevExpress.Xpf.Grid Namespace