我的系统采用的是Blazeds实现后台与flex的通信。
????? <?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:services="services.*" >
<s:layout>
<s:BasicLayout/>
</s:layout>
<fx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.events.FlexEvent;
protected function dataGrid_creationCompleteHandler(event:FlexEvent):void {
person.token = strategyLibraryFlex.listStrategyByCategory(getid,null,\'\');
}
]]>
</fx:Script>
<fx:Declarations>
<s:CallResponder id="person"/>
<services:StrategyLibraryFlex id="strategyLibraryFlex" fault="Alert.show(event.fault.faultString + \'\\n\' + event.fault.faultDetail)" showBusyCursor="true"/>
</fx:Declarations>
<mx:AdvancedDataGrid id="adv" creationComplete="dataGrid_creationCompleteHandler(event)" dataProvider="{person.lastResult}" variableRowHeight="true" >
<mx:groupedColumns>
<mx:AdvancedDataGridColumn headerText="姓名" dataField="name"/>
<mx:AdvancedDataGridColumn headerText="审核状态" dataField="auditState">
</mx:AdvancedDataGridColumn>
<mx:AdvancedDataGridColumnGroup headerText="类型">
<mx:AdvancedDataGridColumn headerText="大类" dataField="type" ></mx:AdvancedDataGridColumn>
<mx:AdvancedDataGridColumn headerText="小类" dataField="category"></mx:AdvancedDataGridColumn>
</mx:AdvancedDataGridColumnGroup>
<mx:AdvancedDataGridColumn headerText="编号" dataField="uuid" />
</mx:groupedColumns>
</mx:AdvancedDataGrid>
</s:Application>
效果是这样的
????? <?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:services="services.*" >
<s:layout>
<s:BasicLayout/>
</s:layout>
<fx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.events.FlexEvent;
protected function dataGrid_creationCompleteHandler(event:FlexEvent):void {
person.token = strategyLibraryFlex.listStrategyByCategory(getid,null,\'\');
}
]]>
</fx:Script>
<fx:Declarations>
<s:CallResponder id="person"/>
<services:StrategyLibraryFlex id="strategyLibraryFlex" fault="Alert.show(event.fault.faultString + \'\\n\' + event.fault.faultDetail)" showBusyCursor="true"/>
</fx:Declarations>
<mx:AdvancedDataGrid id="adv" creationComplete="dataGrid_creationCompleteHandler(event)" dataProvider="{person.lastResult}" variableRowHeight="true" >
<mx:groupedColumns>
<mx:AdvancedDataGridColumn headerText="姓名" dataField="name"/>
<mx:AdvancedDataGridColumn headerText="审核状态" dataField="auditState">
</mx:AdvancedDataGridColumn>
<mx:AdvancedDataGridColumnGroup headerText="类型">
<mx:AdvancedDataGridColumn headerText="大类" dataField="type" ></mx:AdvancedDataGridColumn>
<mx:AdvancedDataGridColumn headerText="小类" dataField="category"></mx:AdvancedDataGridColumn>
</mx:AdvancedDataGridColumnGroup>
<mx:AdvancedDataGridColumn headerText="编号" dataField="uuid" />
</mx:groupedColumns>
</mx:AdvancedDataGrid>
</s:Application>
效果是这样的
![\AdvancedDataGrid多行表头 \AdvancedDataGrid多行表头](https://img-my.csdn.net/uploads/201210/22/1350883809_7138.jpg)