(二)表格样式:
sdk3.5调用时为: styleName="myDataGrid" headerStyleName="myHeaderStyle"
(三)列背景颜色:
//红色表示预测
private var forcastColor:uint = 0xF3402D;
//绿色表示实际
private var factColor:uint = 0x78D749;
//改变AdvancedDataGridColumnGroup组内的每列的颜色
private function changeColGroupBackColor(group:AdvancedDataGridColumnGroup,color:uint):void
{
for each(var col:AdvancedDataGridColumn in group.children)
{
col.setStyle("backgroundColor",color);
}
}
//改变AdvancedDataGridColumn的颜色
private function changeColBackColor(column:AdvancedDataGridColumn,color:uint):void
{
column.setStyle("backgroundColor",color);
}
//选择的时间
public var time:String = "";
//初始化函数
private function group1_creationCompleteHandler(event:FlexEvent):void
{
//名称
changeColBackColor(nameCol,factColor);
//上月
changeColGroupBackColor(lastCol,factColor);
changeColGroupBackColor(utilLastCol,factColor);
}