0
我正在使用mx:tree控件,並且需要在運行時動態填充樹節點。這裏是我有:運行時創建分層數組列表
var ac:ArrayCollection = new ArrayCollection();
ac.addItem({ item: "Parent Item", group: "Group 1"});
ac.addItem({ item: "Parent Item", group: "Group 2" });
var childac:ArrayCollection = new ArrayCollection();
childac.addItem({ item: "Child Item", group: "Group 1"});
//not sure how to add the childac to the ac
trvMain.dataProvider = ac;
如何將孩子陣列集合追加到父陣列的集合,使樹形視圖正確顯示他層次視圖?