我有一个数据网格,并且此网格的数据提供者是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等)是动态的。我如何包括这些?
你可以做的是生成的DataGridColumn动态ActionScript中,而不是在MXML http://milanl.blogspot.com/2009/06/dynamic-columns-in定义它们-datagrid-in-flex.html – JabbyPanda 2011-05-20 20:31:22