Category / Section
How to hide empty child grids in Hierarchical Silverlight GridDataControl?
1 min read
GridDataControl provides support to display data relations and collection properties using NestedGrid. When the ItemsSource of NestedGrid is “null” or “empty”, the GridDataControl displays empty NestedGrid as in the following screenshot.
You can hide the empty NestedGrids by setting the HideEmptyChildGrid property to “True” as in the following code sample.
XAML
<syncfusion:GridDataControl x:Name="dataGrid" AutoPopulateColumns="False" AutoPopulateRelations="False" ColumnSizer="Auto" IsGroupsExpanded="True" ItemsSource="{Binding OrdersDetails}" ShowAddNewRow="False" ShowColumnOptions="True" HideEmptyChildGrid="True" ShowFilters="True" ShowGroupDropArea="True" ShowRowHeader="True" VisualStyle="Metro">
The following screenshot displays the output of the above code in the GridDataControl.