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

Sub header or Stacked header

Thread ID:





149922 Dec 14,2019 10:24 AM UTC Jan 8,2020 08:35 AM UTC WinForms 3
Tags: SfDataGrid
Asked On December 14, 2019 10:24 AM UTC

I'm not able to add Stacked header in SfDataGrid . Please help me 

Gowtham Gopalsamy [Syncfusion]
Replied On December 16, 2019 12:15 PM UTC

Hi Ñêw,   
Thank you for using Syncfusion controls.   
We have prepared a sample to achieve your requirement to add the stacked header. We have attached the sample and UG documentation link for your reference. If your requirement is not achieved with the below details, please provide more details about your requirement. It will help us to investigate further and provide earlier prompt solution.   
Please refer the below code snippet.  
//Creating object for a stacked header row.   
 var stackedHeaderRow1 = new StackedHeaderRow();    
//Adding stacked column to stacked columns collection available in stacked header row object.    
stackedHeaderRow1.StackedColumns.Add(new StackedColumn() { ChildColumns ="OrderID,OrderDate"HeaderText = "Order Details" });    
stackedHeaderRow1.StackedColumns.Add(new StackedColumn() { ChildColumns ="CustomerID,ContactNumber,"HeaderText = "Customer Details" });    
stackedHeaderRow1.StackedColumns.Add(new StackedColumn() { ChildColumns ="ProductName,Quantity,UnitPrice,ShipCountry"HeaderText = "Product Details" });   
 //Adding stacked header row object to stacked header row collection available in SfDataGrid.    
Also, please find the below sample and UG link.  
Please let us know, if you require further assistance on this.   

Replied On January 8, 2020 08:22 AM UTC

Thank you for replying 

Problem solved

Farjana Parveen Ayubb [Syncfusion]
Replied On January 8, 2020 08:35 AM UTC

Hi Ñêw, 
Thanks for the update. 
We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you. 
Farjana Parveen A 


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