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

vertical text stacking in column headers

Thread ID:





73039 Apr 16,2008 05:49 PM UTC May 20,2008 05:31 PM UTC WinForms 2
Tags: GridControl
Andy Chan
Asked On April 16, 2008 05:49 PM UTC


I'm looking for a way to stack my text in a column header. I've attached a picture of what it should look like... is there an easy way to accomplish this through the grid properties? Thanks in advance.



Janagan [Syncfusion]
Replied On May 12, 2008 01:29 PM UTC

Hi Andy,

You can align the text one below the other in the column header by the following code below:

private void gridControl1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
if ((e.ColIndex == 1) && (e.RowIndex == 0))
e.Style.Font.Italic = true;
e.Style.Font.Bold = true;
e.Style.Font.Size = 10;

e.Style.TextColor = Color.Red;
e.Style.FormattedText = " C" + Environment.NewLine + " o" + Environment.NewLine + "n " + Environment.NewLine + "t";

Please refer the sample in the link below which illustrates the above:


Please try running this and let me know if this helps.


Andy Chan
Replied On May 20, 2008 05:31 PM UTC

Thank you, this will work.


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

or the page will be automatically redirected to 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