1 Reply Latest reply on Jun 10, 2011 1:45 PM by MSPMarathon

    AdvancedDataGrid ExpandItem example

    MSPMarathon

      Does anyone have an example of ExpandItem on an AdvancedDataGrid?  I basically have an advanceddatagrid with the dataprovider as a GroupingCollection and the source of the GroupingCollection as an ArrayCollection.  I have tried looking through each item in the ArrayCollection as well as the GroupingCollection and calling myADG.expandItem(obj, true); without success.  I tried to search through the forums on here as well as the internet for an example without success.  Any information on the topic at all would be extremely helpful. Thank you for your time!

       

      James

       

       

        • 1. Re: AdvancedDataGrid ExpandItem example
          MSPMarathon Level 1

          Ok I figured it out basically you have to get your data from your AdvancedDataGrid and put it into a HierarchicalCollectionView. something like:

           

          tempHCollView = HierarchicalCollectionView(myADG.dataProvider);

           

          then create a cursor

          var cursor:IViewCursor = tempHCollView.createCursor();

           

          then just loop through the tempHCollView using that cursor

          while(!cursor.afterLast)

          {

               var node:Object = cursor.current;

               tempHCollView.openNode(node);

               cursor.moveNext;

          }

           

          At least thats how I did it.