Home - Forums-.NET - FlyGrid.Net (Windows Forms) - FlyGrid RowHeadline reading vertically

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

FlyGrid RowHeadline reading vertically
Link Posted: 31-Jul-2006 03:27
Hi,  

I would like to build up an FlyGrid with Headlines on the left side of the table containing text which is readable from the bottom to the top.

Until now, my headline is readable vertically from the top to the bottom so I have to turn my head on the right side to read the text.

I would like to  rotate this text by 180° so I can read the text of this headline by turning my head to the left.

I hope you understand what I describe here.

I used the FormatFlags : System.Drawing.StringFormatFlags.DirectionVertical
But how can I rotate the text?


Thank you for your help!
Link Posted: 31-Jul-2006 09:04
You can override Column.PaintHeader method, use matrix transformations (for details look for the Graphics.Transform property in MSDN), but do not forget to reset transofmartions in this method:
[c#]
Matrix oldMatrix = dci.g.Transform;
dci.g.Transform = myTransformationMatrix;
try
{
  //your code
}
finally
{
  dci.g.Transform = oldMatrix;
}