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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Sub header or Stacked header

Thread ID:

Created:

Updated:

Platform:

Replies:

149922 Dec 14,2019 10:24 AM UTC Jan 8,2020 08:35 AM UTC WinForms 3
loading
Tags: SfDataGrid
Ñêw
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.    
   
sfDataGrid.StackedHeaderRows.Add(stackedHeaderRow1);   
   
   
Also, please find the below sample and UG link.  
    
   
  
    
   
Please let us know, if you require further assistance on this.   
    
Regards,   
Gowtham 


Ñêw
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. 
 
Regards, 
Farjana Parveen A 


CONFIRMATION

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