Set the orientation of the text within a column header

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

1 Reply

KA Kamalakannan A Syncfusion Team 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

Loader.
Up arrow icon