That was very helpful, thank you! Two follow up questions. 

What are the similarities/differences advantages/disadvantages of
using multiple Lists instead of DataGrid? For example, if the data of
the second column depends on the selection in the first column, I
found it easier to just make each column into a List and use the index
of the selected Item in the list as an index into the XML file's
elements and then populate the second List with the new Array.


Secondly, an XML file is already essentially in a tree structure, but
how can you use the file as a dataProvider for the Tree component in
Flex? The method outlined in the previous question of sequentially
populating Lists is basically just a makeshift Tree, but I'd like to
find out how to actually use the XML file as a provider for the Tree.


Thanks again to whoever can help answer these questions.


-Ricky

--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> You can do both.  Bottom line, the DataGrid requires a list of items.
> This can be an XMLList or Array, ONLY if you are certain you will not
> need to update the data items individually.  Best practice is to use an
> XMLListCollection, which is a collection of XML nodes, or an
> ArrayCollection of item value objects.  Each item in the collection
> produces a row.
> 
>  
> 
> Given such a list of data items, each row of the DataGrid gets a
> reference to the data item producing it. You specify which property or
> attribute in the item goes in which column using the DataGridColumn
> object.  If the value you want is in a top-level property of the item
> (an attribute or first level child node of an XML item, or a top-level
> property of the item object) you can specify the dataField.  It the
> value you want is nested deeper in the item object, use labelFunction().
> 
>  
> 
> There are many examples available.
> 
>  
> 
> Tracy
> 
>  
> 

Reply via email to