We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to change the column stacking at runtime in StackedHeader of SfDataGrid?

You can define more than one header for SfDataGrid using SfDataGrid.StackedHeaderRows and you can define the columns by setting StackedHeaderRows.StackedColumns. The columns in StackedHeaderRow are stacked or grouped based on the StackedColumn.ChildColumns property. The following code example has SfDataGrid defined with StackedHeaderRows.


The following screenshot shows SfDataGrid with StackedHeaderRows.


Figure 1: SfDataGrid with StackedHeaderRows

You can change the column stacking at runtime by setting the StackedColumns.ChildColumns property as shown in the following code example.


The following screenshot shows the output of the SfDataGrid with the newly updated ChildColumns to the already existing StackedColumn in StackedHeaderRows.


Figure 2: ChildColumns added to the existing StackedColumn

Sample links:





Article ID: Published Date: Last Revised Date: Platform: Control:
5973 01/12/2016 01/12/2016 UWP SfDataGrid
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon