我有一个数据网格:
<mx:DataGrid id="resultsDataGrid"
height="328" width="604" paddingRight="0" editable="false" y="43" horizontalCenter="0">
<mx:columns>
<mx:DataGridColumn headerText="Title" dataField="title"/>
<mx:DataGridColumn headerText="Updated" dataField="updated"/>
</mx:columns>
</mx:DataGrid>
<feed xmlns="http://www.w3.org/2005/Atom">
<title></title>
<link href=""/>
<link rel="" href=""/>
<updated></updated>
<author>
<name></name>
</author>
<id></id>
<entry>
<title></title>
<link href=""/>
<id></id>
<updated></updated>
<published></published>
<summary></summary>
<author>
<name></name>
</author>
<category term="" label=""/>
<category term="" scheme=""/>
</entry>
</feed>
现在,所有这些字段在返回时都会被填充,但为了更简单,我删除了这些值。
private function searched(event:ResultEvent):void
{
var result:XML = XML(event.result);
//summaryText.text = result.toXMLString();
//Alert.show(result.children().children().children().toString() + "hey");
resultsDataGrid.dataProvider = result.entry;
}
我只需要将标题和更新的字段实际加载到DataGrid中。
这显然不起作用,所以我来寻求帮助,如果有人有经验,可以告诉我如何正确安排,我将不胜感激。(我认为这与结果输入,一定是别的什么东西result.feed.entry输入,但我尝试了许多组合,但都没有成功——除非我没有找到正确的组合。)