That is certainly a very good solution. In fact, it will be the most performant if you use strongly typed value objects in your array collection. For complex displays, there can be a noticeable performance hit when accessing XML. There are other advantages to doing it this way also, such as making calculated properties, sorting, etc.
To stay with e4x XML, use a labelFunction, which can traverse the nested xml nodes as needed. Tracy Spratt, Lariat Services, development services available _____ From: [email protected] [mailto:[email protected]] On Behalf Of shizny Sent: Sunday, August 02, 2009 11:23 AM To: [email protected] Subject: [flexcoders] Re: xml as dataprovider to datagrid Thanks for the response. I've decided the best/most flexible way for me to work this out is to build my own arraycollection from traversing xml and use that as my dp --- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com, Guy Morton <g...@...> wrote: > > Single item nodes get turned into objects, not arraycollections. > > This is a common source of confusion and pain. AFAIK, there is no easy > way to deal with this - your code must anticipate the two data types. > > Guy > > On 02/08/2009, at 11:34 AM, shizny wrote: > > > Hello, > > > > I'm having some really weird issues with populating an > > advanceddatagrid with xmlList (quoteXMLList) data. Here is my > > situation. I've got an xmllist that, when looking at one entry > > (xmlList[0]), has xml looking like this. > > > > <response> > > <cost> > > <totalCost>20</totalCost> > > </cost> > > </response> > > > > Now I'm trying to get totalCost as a datafield and for it to show up > > in a adg column. So I tried something like this > > > > <mx:AdvancedDataGrid editable="false" width="100%" height="100%" > > variableRowHeight="true" id="quoteDataGrid" > > dataProvider="{this.quoteXMLList}"> > > <mx:columns> > > <mx:AdvancedDataGridColumn dataField="cost.totalCost" > > headerText="Total Cost" /> > > > > But nothing shows up. So, I changed my dataprovider to > > this.quoteXMLList.cost and put dataField="totalCost" and it shows up > > fine. But I can't do that cause I have more info I need to gather > > for other columns that is in different areas of the xml in the > > current xmlList. So, can you not put e4x notation in datafield, if > > not what do I do here? Thanks in advance. > > > > Josh > > > > > > > > >

