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

Stacked column header wrap text

Thread ID:





119323 Jun 4,2015 08:41 PM UTC Jun 8,2015 05:28 AM UTC WinRT 3
Tags: SfDataGrid
Asked On June 4, 2015 08:41 PM UTC


How can I wrap header text in the Stacked Column header? or show text in a smaller font when it doesn't fit in the provided column width? 


Farjana Parveen Ayubb [Syncfusion]
Replied On June 5, 2015 09:52 AM UTC

Hi Vasanth,

Thank you for contacting Syncfusion support.

We have analyzed the reported query and you can achieve this by customizing the GridStackedHeaderCellControl in SfDataGrid.

Please refer the below code snippet and sample in the following location:

Code Snippet:

        <Style TargetType="syncfusion:GridStackedHeaderCellControl">

            <Setter Property="Template">


                    <ControlTemplate TargetType="syncfusion:GridStackedHeaderCellControl">

                        <Border Background="{TemplateBinding Background}"

                            BorderBrush="{TemplateBinding BorderBrush}"

                            BorderThickness="{TemplateBinding BorderThickness}">

                            <Grid Margin="{TemplateBinding Padding}">

                                <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"

                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"

                                              FontFamily="{TemplateBinding FontFamily}"

                                              FontSize="{TemplateBinding FontSize}"

                                              FontWeight="{TemplateBinding FontWeight}">

                                            <TextBlock Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Content}"    TextWrapping="Wrap"/>







Sample Location: StackedHeader_TextWraping

Farjana Parveen A

Replied On June 5, 2015 02:45 PM UTC

Awesome, thank you. Worked like a champ!

Saranya CJ [Syncfusion]
Replied On June 8, 2015 05:28 AM UTC

Hi Vasanth,
Thank you for your update. Please let us know if you require any other assistance on this.


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