flex 2.0 에서 멀티헤더를 구현하려고 고생했던 기억이 나는데, 3.0 에서는 아주 간단하게 구현된다. ㅡㅡ;
진작에 좀 만들지;
- multiHeader.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
[Bindable]
public var myData:Array =
[
{No:'1', Name:'Jane', midexam_total:'450', midexam_avg:'90', lastexam_total:'425', lastexam_avg:'85', total_avg:'87.5'},
{No:'2', Name:'Tom', midexam_total:'320', midexam_avg:'64', lastexam_total:'400', lastexam_avg:'80', total_avg:'72'}
];
]]>
</mx:Script>
<mx:AdvancedDataGrid dataProvider="{myData}" textAlign="center" fontFamily="돋움" fontSize="12" left="10" top="10">
<mx:groupedColumns>
<mx:AdvancedDataGridColumn dataField="No" headerText="No." />
<mx:AdvancedDataGridColumn dataField="Name" headerText="이름" />
<mx:AdvancedDataGridColumnGroup headerText="점수">
<mx:AdvancedDataGridColumnGroup headerText="중간고사">
<mx:AdvancedDataGridColumn dataField="midexam_total" headerText="총점" />
<mx:AdvancedDataGridColumn dataField="midexam_avg" headerText="평균" />
</mx:AdvancedDataGridColumnGroup>
<mx:AdvancedDataGridColumnGroup headerText="기말고사">
<mx:AdvancedDataGridColumn dataField="lastexam_total" headerText="총점" />
<mx:AdvancedDataGridColumn dataField="lastexam_avg" headerText="평균" />
</mx:AdvancedDataGridColumnGroup>
<mx:AdvancedDataGridColumn dataField="total_avg" headerText="총 평균" />
</mx:AdvancedDataGridColumnGroup>
</mx:groupedColumns>
</mx:AdvancedDataGrid>
</mx:Application>
|
본 글은 복구된 글이라 예전 Flex3 베타시절의 SWF 파일로 복구할 수는 없었습니다. Flex 3 버전에서 빌드한 SWF를 올립니다.