开发者

FLEX datagrid and XML list content

开发者 https://www.devze.com 2022-12-30 22:38 出处:网络
I have the following XML list: <Queries> <Query id=\"1\">qq</Query> <Query id=\"2\">rr</Query>

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

精彩评论

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