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

Hide default header but show stacked headers

Thread ID:





149874 Dec 12,2019 01:17 PM UTC Dec 16,2019 12:45 PM UTC Xamarin.Forms 3
Tags: SfDataGrid
Roland Kammerer
Asked On December 12, 2019 01:17 PM UTC


I'm trying to dynamically create GridViews using the SfDataGrid component. Most of if works well beside one but essential issue:
I have dynamic table header templates (with colspan, header texts, etc.) coming from the DB. I managed to get this working with the Stacked Header feature. My problem now is that the default header row (showing the column binding variables -> data[0]...) is shown and I couldn't find a way to get rid of it. Setting rowheight=0 also removes the StackedHeaderRows.
Any advice on how to adjust this to my needs?

Many Thanks


Karthikraja Kalaimani [Syncfusion]
Replied On December 13, 2019 11:37 AM UTC

Hi Roland,

Thanks for contacting Syncfusion support.

Your requirement to hide the header row of SfDataGrid can be achieved by setting the header row height as 0 in SfDataGrid.QueryRowHeight event.

Please refer the below code example,

private void Sfgrid_QueryRowHeight(object sender, QueryRowHeightEventArgs e) 
            //sfgrd.GetHeaderIndex() will return index of the Header Row. 
            if (e.RowIndex == sfgrid.GetHeaderIndex()) 
                e.Height = 0; 
                e.Handled = true; 

Sample link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/DataGrid_Demo235139570.zip

We hope this helps, please let us know if need further assistance from us.

Karthik Raja 

Roland Kammerer
Replied On December 13, 2019 12:07 PM UTC


Exactly what I was looking for.
Many thanks for the great support!


Karthikraja Kalaimani [Syncfusion]
Replied On December 16, 2019 12:45 PM UTC

Hi Roland,
Thanks for update. We are happy that the mentioned issue has been resolved at your end.

Karthik Raja 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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
Live Chat Icon