<?xml version="1.0" encoding="UTF-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="srv.send()"> <mx:ArrayCollection id="airportCollection"> <mx:source>{srv.lastResult.airports.location}</mx:source> <mx:sort> <mx:Sort> <mx:fields> <mx:Array> <mx:SortField name="abbreviation" descending="true" /> </mx:Array> </mx:fields> </mx:Sort> </mx:sort> </mx:ArrayCollection> <mx:HTTPService id="srv" url="../assets/airports.xml" result="airportCollection.refresh()" /> <mx:Label text="The items in this datagrid should be in descending order using the 'abbreviation' field." /> <mx:DataGrid id="dg" dataProvider="{airportCollection}" width="350" /> </mx:Application> |