0 Replies Latest reply on Oct 9, 2009 9:56 AM by iceflex

    AdvancedDataGrid Grouping


      Hello Forum,

      I'm trying to add new empty branch node to the existent node programmatically from itemRenderer - '+' - button. My approach is:


      var uint:currentIndex =  AdvancedDataGrid(owner).selectedIndex;

      var selectedRecord:Object = AdvancedDataGrid(owner).selectedItem;

      var hcv:HierarchicalCollectionView = AdvancedDataGrid(owner).dataProvider as HierarchicalCollectionView;

      var newBranch:Object = new Object();

      hcv.addChildAt(selectedRecord, newBranch, selectedIndex++);


      As a result the leaf node is created but I need the brach node.

      Can any one help?


      Thanks in advance,