views:

268

answers:

1

I have the following XML list:

<Queries>
    <Query id="1">qq</Query>
    <Query id="2">rr</Query>
    <Query id="3">ss</Query>
</Queries>

and I would like to display it in the following datagrid:

<mx:DataGrid id="dataGrid" dataProvider="@{Queries.Query}" editable="true" width="500">
    <mx:columns>
         <mx:DataGridColumn headerText="id" dataField="@id" resizable="false" width="100"/>
         <mx:DataGridColumn headerText="Query" dataField="Query"/>
    </mx:columns>
</mx:DataGrid>

The 'id' column is correctly populated but the 'Query' column is empty. How can I solve this?

+1  A: 

Hi,

Try this.

<mx:DataGrid id="dataGrid" dataProvider="{Queries.Query}" editable="true" width="500">
<mx:columns>
     <mx:DataGridColumn headerText="id" dataField="@id" resizable="false" width="100"/>
     <mx:DataGridColumn headerText="Query" dataField="*"/>
</mx:columns>

Regards, Ravish.

Ravz
Yes! It did it!
Alessandro Baldoni
So I believe this question is answered.. :)
Ravz