我有一个数据网格,这个网格的数据提供者是 RPC 调用的结果。结果集具有以下结构:
Array
[0]->Object #1
[one] => 1
[two] => 1
[three] => Object #2
[apple1] = > Object #3
[color] => red
[rate] => 20
[apple2] => Object #4 ( the number of apples is dynamic, apple3,apple4 .. and so on)
[color] => blue
[rate] => 100
等等......所以苹果对象的数量会因为它的动态而变化。如何在数据网格中显示这些数据?
我看到很多关于创建“嵌套 DataGridColumn”类的文章......就像这样:
http://active.tutsplus.com/tutorials/flex/working-with-the-flex-datagrid-and-nested-data-structures/
它有帮助,但我的数据的问题是某些索引(如 apple1、apple2 等)是动态的。我如何包括那些?