|
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundAlpha="0" creationComplete="srv.send()">
<mx:Script>
import mx.collections.ArrayCollection;
[Bindable] public var employees:ArrayCollection;
</mx:Script>
<mx:HTTPService id="srv" url="../assets/employees.xml" useProxy="false" result="employees = new ArrayCollection(srv.lastResult.list.employee)"/>
<mx:DataGrid width="100%" height="100%" dataProvider="{employees}" editable="true"> <mx:columns> <mx:Array> <mx:DataGridColumn dataField="name" headerText="Name"/> <mx:DataGridColumn dataField="phone" headerText="Phone"/> <mx:DataGridColumn dataField="email" headerText="Email"/> </mx:Array> </mx:columns> </mx:DataGrid>
</mx:Application>