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
close icon

Custom Group Header Template

Hi,

    Is there any way to add custom group header template in SfDataGrid  ?
    
    The default Group Header Style Is   ColumnName : Value - Count 


Attachment: GroupHeader_553ae94c.rar

1 Reply

JS Jayapradha S Syncfusion Team March 10, 2015 06:13 AM UTC

Hi Mahesh,

 

Thank you for using Syncfusion products.

 

We have analyzed your query and it is possible to customize the group header template by using GroupCaptionTextFormat as shown in the below code snippet,

 

Code Snippet:

<Syncfusion:SfDataGrid x:Name="datagrid"  Grid.Row="1"

                               ColumnSizer="Star"

                               AutoGenerateColumns="False"

                               AllowResizingColumns="True"

                               AllowEditing="True"                      

                               GroupCaptionTextFormat="'{Key}-{ItemsCount}Items'"

                               AllowSorting="True"  

                               ItemsSource="{Binding Employees}"

                               AllowGrouping="True"

                               ShowGroupDropArea="True">       

 

Please refer the below UG document to customize the GroupHeaderText,

UG Link:  http://help.syncfusion.com/UG/Windows%20Phone%208/default.htm#!Documents/howtoformatcaptionsu.htm

 

You can also defines more than one summary row for every group and find the UG Link to define group summaries.

UG Link: http://help.syncfusion.com/UG/Windows%20Phone%208/default.htm#!Documents/summaries.htm

 

Please find the below KB document to customize the GroupKey and itemscount,

KB Link: https://www.syncfusion.com/kb/3249/how-to-customize-the-captionsummarycell-text-in-the-sfdatagrid

 

 

Kindly let us know if you have any other queries.

 

With Regards,

Jayapradha

 


Loader.
Live Chat Icon For mobile
Up arrow icon