Articles in this section
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.

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied