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.
Syncfusion Feedback

Set the orientation of the text within a column header

Thread ID:

Created:

Updated:

Platform:

Replies:

95809 Aug 3,2010 12:20 AM UTC Aug 11,2010 05:26 AM UTC WPF 1
loading
Tags: Chart
Administrator [Syncfusion]
Asked On August 3, 2010 12:20 AM UTC

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?



90DegreeColumnHeader_58b68475.zip

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

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.

Thanks
Kamalakannan

CONFIRMATION

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.

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

;