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.

Set the orientation of the text within a column header

Thread ID:





95809 Aug 2,2010 08:20 PM Aug 11,2010 01:26 AM WPF 1
Tags: Chart
Administrator [Syncfusion]
Asked On August 2, 2010 08:20 PM

I am looking to set the text orientation for a column header to be angled.

I have tried implementing IGridDataVisualStyle and setting the Orientation of ValueFont to be 90. However, that did not work.

I also tried setting the column's HeaderStyle.Font.Orientation, and that also did not work.

I am attaching a wire-frame of the appearance I want.

Is there a way to rotate the entire contents of a header cell?


Kamalakannan A [Syncfusion]
Replied On August 11, 2010 01:26 AM

Hi Jimmy,

Thanks for using syncfusion products.

You can set the font Orientation for header as follows.

[Code] [C#]

void dataGrid_Loaded(object sender, RoutedEventArgs e)
GridDataVisibleColumn col = this.dataGrid.VisibleColumns[1] as GridDataVisibleColumn;
col.HeaderStyle = new GridDataColumnStyle();
GridDataColumnStyle style = col.HeaderStyle as GridDataColumnStyle;
style.BorderMargins.Left = 70;
GridFontInfo fontstyle = new GridFontInfo();
fontstyle = col.HeaderStyle.Font;

fontstyle.Orientation = 90;

this.dataGrid.Model.RowHeights[0] = 100d;
Let us know if you need any more information.



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.