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.
Unfortunately, activation email could not send to your email. Please try again.

how to wrap Column headers

Thread ID:





117804 Dec 18,2014 01:04 AM Dec 21,2014 08:54 PM Windows Forms 1
Tags: GridGroupingControl
Asked On December 18, 2014 01:04 AM

I am using gridgrouping control
I want to wrap column headers.Is there any method for wrapping text?

Muthukumar Kalyanasundaram [Syncfusion]
Replied On December 21, 2014 08:54 PM

Hi Rasika,


Thank you for your interest in Syncfusion products.


If you want to set the wrap column header in a grid, you can enable the “WrapText” property as true. Please make use of below code,



Suggestion 1:

this.gridGroupingControl1.TableDescriptor.Appearance.ColumnHeaderCell.WrapText =true;


Suggestion 2:

this.gridGroupingControl2.TableModel.RowHeights.ResizeToFit(GridRangeInfo.Row(5), GridResizeToFitOptions.None);

this.gridGroupingControl2.TableModel.BaseStylesMap["Column Header"].StyleInfo.WrapText = true;

this.gridGroupingControl2.TableModel.BaseStylesMap["Column Header "].StyleInfo.AutoSize = false;


Suggestion 3:

this.gridGroupingControl2.TableControl.PrepareViewStyleInfo += new Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventHandler(TableControl_PrepareViewStyleInfo);

void TableControl_PrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs e)


if (e.RowIndex == 2  && e.ColIndex == 3) // Column header index


e.Style.WrapText = true;

e.Style.BackColor = Color.Red;




Please let us know if you have any concern.



Muthukumar K


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.

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.