0
我需要獲取節點打開的advanceddatagrid中每行的數據。AdvancedDatagrid迭代打開葉/樹的每一行
例如,我的ADG看起來是這樣的:
+ Science
- Math
- Passed
John Doe | A+ | Section C
Amy Rourke | B- | Section B
- Failed
Jane Doe | F | Section D
Mike Cones | F | Section D
- English
+ Passed
+ Failed
- History
+ Passed
- Failed
Lori Pea | F | Section C
我用下面的代碼來獲取開放節點嘗試:
var o:Object = new Object();
o = IHierarchicalCollectionView(myADG.dataProvider).openNodes;
但這樣做下面的代碼來檢查對象:
Alert.show(ObjectUtil.toString(o), 'object inpsection');
給我:
(Object)#0
Math (2)
children = (mx.collections::ArrayCollection)#2
filterFunction = (null)
length = 2
list = (mx.collections::ArrayList)#3
length = 2
source = (Array)#4
[0] (Object)#5
children = (mx.collections::ArrayCollection)#6
filterFunction = (null)
length = 2
list = (mx.collections::ArrayList)#7
length = 2
source = (Array)#8
[0] <Table>
<Name>John Doe</Name>
<Grade>A+</Grade>
<Section>Section C</Section>
</Table>
[1] <Table>
<Name>Amy Rourke</Name>
<Grade>B-</Grade>
<Section>Section B</Section>
....
...
..
基本上,我只需要創建一個對象或數組或XMLList,會給我:
Math | Passed | John Doe | A+ | Section C
Math | Passed | Amy Rourke | B- | Section B
Math | Failed | Jane Doe | F | Section D
Math | Failed | Mike Cones | F | Section D
History | Failed | Lori Pea | F | Section C
任何建議將高度讚賞。謝謝