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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to customize the height of Stacked Header Row in SfDataGrid?

Platform: UWP |
Control: SfDataGrid

SfDataGrid allows you to have additional unbound header rows, known as Stacked Header Rows that span across Grid Columns. You can group two or more columns under each of the Stacked Header. A Stacked Header Row is viewed as a set of Stacked Columns, where each Stacked Column contains a number of Child Columns. By default, the Stacked Header Row’s height is constantly maintained as 24 as shown in the following screenshot.

 

C:\Users\Adithi\AppData\Roaming\Skype\My Skype Received Files\modified.png

Figure 1: Default row height of the Stacked Header Row

You can customize the height of Stacked Header Row by accessing the RowHeight property of the Visual Container. You can access the Visual Container by using the GetVisualContainer() extension method that exists in the Syncfusion.UI.Xaml.Grid.Helpers namespace in SfDataGrid.

Calculated here is the count of the StackedHeaderRows and RowHeight is applied to each row of the Stacked Header.

C#

The above RowHeight value changes are set to Stacked Header Row as shown in the following screenshot.

 

C:\Users\Adithi\AppData\Roaming\Skype\My Skype Received Files\modif.png

Figure 2: Customized Row Height

 

Sample Links:

WPF

WRT

UWP

2X faster development

The ultimate UWP UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

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

Live Chat Icon For mobile