I’m having trouble in rotating the header text in my datagrid. I don’t know understand the reason why its failing.Can someone help?
Datagrid column AS3 code:
dgc=new DataGridColumn();
dgc.dataField=columnName.gene;
dgc.labelFunction=gridLabelFunction
dgc.headerText=columnName.gene;
//dgc.headerWordWrap=true;
dgc.headerRenderer=new ClassFactory(VDGHeader);
dgc.width=20;
_datagridColumnsArray.push(dgc);
Please find my Header Renderer component below
import mx.controls.dataGridClasses.DataGridColumn;
import mx.managers.SystemManager;
[Bindable] private var text:String;
[Bindable] private var src:String;
override public function set data(value:Object):void{
var col:DataGridColumn = value as DataGridColumn;
text = col.headerText;
}
]]>
</fx:Script>
<mx:Label id="txtLbl" text="{text}" rotation="10" width="100%" />
This actually doesn’t have anything to do with column headers.
To rotate text in Flex you must embed the font. Otherwise the rotation will simply be ignored.
See Adobe’s docs on Embedding Fonts