Hello, I'm trying to populate a datagrid. Here is my code. Everything
works, but when I use the dataProvider dg2data within my datagrid it
comes back empty. I know there is data there, but not sure if I'm
missing something.
public function onSelectFirstGrid(event:Event):void
{
myRequest.addEventListener(Event.COMPLETE, onResult)
myRequest.send(dg.selectedItem.myID);
}
private function onResult(e:ResultEvent):void
{
dg2data = e.result as XMLListCollection;
}
private function onFault(e:FaultEvent):void
{
Alert.show(e.fault.message, "Could not load");
}
[Bindable]
public var dg2data: XMLListCollection;
My DataGrid
<mx:DataGrid id="dg2" width="100%" height="100%" rowCount="10"
dataProvider="{dg2data}">
<mx:columns>
<mx:DataGridColumn dataField="name" headerText="Name" />
</mx:columns>
</mx:DataGrid>
Thanks!