.NET MAUI TreeDataGrid Empty Template
The .NET MAUI TreeDataGrid control provides the ability to specify a template when the ItemsSource
is null or collection is empty.
It exposes the following properties:
EmptyContentTemplate
(DataTemplate
)—Defines the content of the view which is shown when in the view has no items.-
EmptyContentDisplayMode
—Defines the modes for displaying empty content. The property has two modes:-
ItemsSourceNull
—Displays the empty content view only when theItemsSource
is null. -
ItemsSourceNullOrEmpty
—Displays the empty content view whenItemsSource
is null or when the source is empty (has zero items).
-
As the TreeDataGrid inhertis from the DataGrid, for a runnable example with empty template scenario, see the SDKBrowser Demo Application and go to DataGrid > Empty Template category.