效果图,如下
/*===========================================*/
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:AdvancedDataGrid x="89" y="56" id="ad" designViewDataType="flat" dataProvider="{arr}">
<mx:groupedColumns>
<mx:AdvancedDataGridColumnGroup headerText="国家">
<mx:AdvancedDataGridColumnGroup headerText="省-市">
<mx:AdvancedDataGridColumn headerText="城市" dataField="city"/>
<mx:AdvancedDataGridColumn headerText="省份" dataField="provice"/>
</mx:AdvancedDataGridColumnGroup>
<mx:AdvancedDataGridColumn headerText="国家" dataField="coutry"/>
</mx:AdvancedDataGridColumnGroup>
</mx:groupedColumns>
</mx:AdvancedDataGrid>
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
var arr:ArrayCollection=new ArrayCollection([
{city:"Shanghai",provice:"上海",coutry:"中国"},
{city:"Beijing",provice:"河北省",coutry:"中国"},
{city:"Nanjing",provice:"江苏省",coutry:"中国"},
{city:"Hangzhou",provice:"浙江省",coutry:"中国"}
]);
]]>
</mx:Script>
</mx:Application>