The single instance of employee in the second version of
the xml is not being treated as an array of employee objects. You need to
convert it to an array.
try changing your datagrid line to:
<mx:DataGrid id="dg"
dataProvider="{mx.utils.ArrayUtil.toArray(temp.employee}"/>
--
Ronald Kinion
253-205-3000
x5162
[EMAIL PROTECTED]
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of flex scripter
Sent: Thursday, June 09, 2005 2:18 PM
To: [email protected]
Subject: [flexcoders] Doubt about XML and DataGrid
<mx:Application xmlns:mx=" http://www.macromedia.com/2003/mxml" >
<mx:Model id="temp" source="xml_src.xml"></mx:Model>
<mx:DataGrid id="dg" dataProvider="{ temp.employee}"/>
</mx:Application>
and in my XML file if I have
<employees>
<employee name ="Christina Coenraets" phone ="555-219-2270" email=" [EMAIL PROTECTED]" active="true"/>
<employee name ="Louis Freligh" phone="555-219-2100" email=" [EMAIL PROTECTED]" active="true"/>
</employees>
The data grid is populated. But if I have just
<employees>
<employee name ="Christina Coenraets" phone ="555-219-2270" email=" [EMAIL PROTECTED] " active="true"/>
</employees>
My data grid isnt getting populated.
What am I missing here ??
Thanks for your time and advice
Regards
Fx.
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

