【发布时间】:2012-01-20 15:41:26
【问题描述】:
有没有办法获取展开的 ADG 树节点下的项目?
给定示例树节点:
- Atlantic
Celtics
Nets
Knicks
Sixers
Raptors
+ Central
+ SouthEast
+ SouthWest
+ NorthWest
+ Pacific
我计划在 ADG 的 itemOpen 事件中捕获数据。
private function myADG_ItemOpen(event:AdvancedDataGridEvent) :void
{
// What codes do I put here to get the following teams:
// Celtics, Nets, Knicks, Sixers, Raptors
}
更新: 我设法提取了一些代码,这些代码以某种方式为我提供了一个包含团队的对象:
var ihd:IHierarchicalData = IHierarchicalCollectionView(myADG.dataProvider).source;
if(ihd.hasChildren(evt.item))
{
var objGetChildren:Object = ihd.getChildren(evt.item);
var dataString:String = ObjectUtil.toString(objGetChildren);
// From here, I am able to parse the dataString to an array, where I am able to get the team name.
}
【问题讨论】:
标签: apache-flex actionscript advanceddatagrid