Articles in this section
Category / Section

How to hide the HeaderRow in Nested Grid?

2 mins read

You can change the HeaderRow height by setting HeaderRowHeight property. You can hide HeaderRow of Nested Grid by setting the HeaderRowHeight property to “0” in GridViewDefinition. Refer the following code example.

XAML

<syncfusion:SfDataGrid.DetailsViewDefinition>
    <syncfusion:GridViewDefinition RelationalColumn="OrderDetails">
        <syncfusion:GridViewDefinition.DataGrid>
            <syncfusion:SfDataGrid  x:Name="DetailsViewGrid" 
                                                    HeaderRowHeight="0" 
                                                    AutoGenerateColumns="False">
                <syncfusion:SfDataGrid.Columns>
                    <syncfusion:GridTextColumn MappingName="OrderID" />
                    <syncfusion:GridTextColumn MappingName="ProductID" TextAlignment="Right" />
                    <syncfusion:GridTextColumn HeaderText="Unit Price"
                                                        MappingName="UnitPrice"
                                                        TextAlignment="Right" />
                    <syncfusion:GridTextColumn MappingName="Quantity" TextAlignment="Right" />
                    <syncfusion:GridTextColumn MappingName="Discount" TextAlignment="Right" />
                    <syncfusion:GridTextColumn MappingName="CustomerID" />
                    <syncfusion:GridDateTimeColumn HeaderText="Order Date"
                                                            MappingName="OrderDate"
                                                            TextAlignment="Right" />
                </syncfusion:SfDataGrid.Columns>
            </syncfusion:SfDataGrid>
        </syncfusion:GridViewDefinition.DataGrid>
    </syncfusion:GridViewDefinition>
</syncfusion:SfDataGrid.DetailsViewDefinition>

 

The following screenshot displays the output of Nested Grid without header row.

F:\KB\HeaderRowHight.png

Sample Links:

WPF

WRT

SilverLight

UWP

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