Hi,

I am parsing data from an xml file(sheet11.xml) into an 
ArrayCollection, and some of the fields in the xml files has no data,
such as <field2>:

sheet11.xml
<row>
 <field1>data1</field1>
 <field2></field2>
 <field3>data1</field3>
</row>

when i populate the data into my datagrid and execute the mxml, i 
have the field2 column filled with '[object object]' rather than 
being blank. How is that I can make the field showing no text if 
there no data coming from the xml. can someone please help me on 
this. thank you.

import mx.utils.ArrayUtil;

<mx:Model id="dataXML" source="sheet11.xml"/>                   
        <mx:ArrayCollection source="{ArrayUtil.toArray(dataXML.row)}" 
id="theData"/>


<mx:DataGrid id="dg" allowMultipleSelection="true"  
dataProvider="{theData}">
<mx:columns>
<mx:DataGridColumn dataField="field1"/>
<mx:DataGridColumn dataField="field1"/>
<mx:DataGridColumn dataField="field1"/>
</mx:columns>
</mx:DataGrid>





Reply via email to