1

I am using Spark Datagrid in my flex project. I want to add two columns under one header means I want a column grouping into Spark Datagrid. I have found many example regarding mx:datagrid and AdvancedDataGrid but I want in Spark Datagrid.How can achieve this in spark datagrid. Please help me its really important for me.

Thanks.

4

1 回答 1

0

您可以使用 labelFunction 将 dataProvider 的两个字段分组为一列。

标签函数示例:

public function myLabelFunction(item:Object, column:GridColumn):String {
    return item.field1+ " - " + item.field2; 
}

GriColumn:

<s:GridColumn labelFunction="myLabelFunction"/>
于 2012-12-19T15:23:44.640 回答