How come when I'm setting up a data grid using an ArrayCollection as
the datasource I dont have to specify the contents of the data grid
columns? I can just do this:
<mx:DataGrid id="dg1" x="42" y="0" width="950" height="100"
dataProvider="{bookData.lastResult.books.stock}" />
But in order to get anything to appear on the data grid with either XML
or XMLListCollection I have to do the column layout (like this)?
<mx:DataGrid id="dg3" x="42" y="300" width="950" height="100"
dataProvider="{bookStock2}" >
<mx:columns>
<mx:DataGridColumn dataField="name" headerText="name"/>
<mx:DataGridColumn dataField="author" headerText="author"/>
<mx:DataGridColumn dataField="category"headerText="category"/>
<mx:DataGridColumn dataField="description" headerText="description"/>
</mx:columns>
</mx:DataGrid>
Thanks in advance,
brad