开发者

FLEX datagrid and XML list content

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.Q开发者_开发问答uery}" 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜