返回顶部

收藏

排序集合中的元素

更多
<fx:Declarations>
    <s:ArrayCollection id="collection">
        <s:source>
            <fx:Object city="Columbus" state="Ohio" region="East"
            <fx:Object city="Cleveland" state="Ohio" region="East
            <fx:Object city="Sacramento" state="California" regio
            <fx:Object city="Atlanta" state="Georgia" region="Sou
        </s:source>
        <s:sort>
            <mx:Sort>
                <mx:SortField name="region" />
                <mx:SortField name="state" />
            </mx:Sort>
        </s:sort>
    </s:ArrayCollection>
</fx:Declarations>
<mx:AdvancedDataGrid dataProvider="{collection}">
    <mx:columns>
        <mx:AdvancedDataGridColumn dataField="city" />
    <mx:AdvancedDataGridColumn dataField="state" />
        <mx:AdvancedDataGridColumn dataField="region" />
    </mx:columns>
</mx:AdvancedDataGrid>

//该片段来自于http://outofmemory.cn

标签:flash,ActionScript,基础

收藏

0人收藏

支持

0

反对

0