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

Merging column headers in an SfDataGrid

Hi,

I'm trying to merge some of the header cells in an SfDataGrid control.  Please see the below mockup which demonstrates what I'm trying to do (specifically "Column 3").  Is this possible?  Thanks.



6 Replies

AS Ayyanar Sasi Kumar Jeyaraj Syncfusion Team October 14, 2015 02:32 PM UTC

Hi Cameron,
Thank you for contacting Syncfusion support.
We have analyzed your query and you can achieve your requirement by using StackedHeaders in SfDataGrid to merge the column headers as you mentioned in the snapshot.
Please refer the below code example to create the StackedHeaders in SfDataGrid
XAML:

<Syncfusion:SfDataGrid.Columns>

                <Syncfusion:GridTextColumn MappingName="name"/>

                <Syncfusion:GridTextColumn MappingName="A"/>

                <Syncfusion:GridTextColumn MappingName="B"/>

                <Syncfusion:GridTextColumn MappingName="C"/>

                <Syncfusion:GridTextColumn MappingName="D"/>

                <Syncfusion:GridTextColumn MappingName="E"/>

                <Syncfusion:GridTextColumn MappingName="F"/>

                <Syncfusion:GridTextColumn MappingName="G"/>

            </Syncfusion:SfDataGrid.Columns>

            <Syncfusion:SfDataGrid.StackedHeaderRows>

                <Syncfusion:StackedHeaderRow>

                    <Syncfusion:StackedHeaderRow.StackedColumns>

                        <Syncfusion:StackedColumn  ChildColumns="D,E,F" HeaderText="Columns"></Syncfusion:StackedColumn>

                    </Syncfusion:StackedHeaderRow.StackedColumns>

                </Syncfusion:StackedHeaderRow>

            </Syncfusion:SfDataGrid.StackedHeaderRows>

We have prepared the sample based on your requirement and please find the sample from the following location:
Sample:
http://www.syncfusion.com/downloads/support/forum/120765/ze/WinRT691212502
Please let us know if you have any query.
Regards,
Ayyanar


KB Kevin Bernard San Gaspar September 23, 2016 10:59 AM UTC

Hi,

Is this feature in Xamarin.iOS as well?


AN Ashok N Syncfusion Team September 26, 2016 04:33 AM UTC

Hi Kevin, 
  
Currently we don’t have support for “StackedHeaders” in our SfDataGrid (Xamarin platform). A support incident to track the status of this feature has been created under your account. Please log on to our support website to check for further updates: 
  
 
Regards, 
Ashok 



CY Chonlada Yoisang August 23, 2018 07:53 AM UTC

Hi,

Is this feature in Xamarin now? if not, do you have any suggest to make it work like that?

Thanks.



AA Arulraj A Syncfusion Team August 24, 2018 10:37 AM UTC

Hi Chonlada,   
   
Thanks for contacting Syncfusion support.   
   
We are sorry to let you know that currently we do not have support to merge column headers. We have already considered the “Provide support for StackedHeader in SfDataGrid” as feature and added it to our feature request list. It will be available in any of our upcoming releases and it can be tracked through our Features Management System in the support ticket 213385. 
    
Please let us know if you require further assistance.   
 
Regards, 
Arulraj A 



SP Subburaj Pandian Veluchamy Syncfusion Team July 2, 2019 11:41 AM UTC

Hi Chonlada,  
  
We are glad to announce that our Essential Studio 2019 Volume 2 Beta Release version 17.2.0.28 is rolled out with the “Stacked Header feature in DataGrid” and is available for download under the following link.  
   
  
Note: This feature be included in our main release as well, which is expected to be available by mid of July 2019.  
 
Kindly refer the attached sample for the same, 
 
   
You can refer our User Guide documentation regarding the same by the following link, 
 
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.  
 
Regards,
Subburaj Pandian V    
 


Loader.
Up arrow icon