0 Replies Latest reply on Apr 30, 2008 3:47 PM by joshua_shizny

    traversing and editing groupingCollection


      ok, anybody know how to transform a groupingCollection into some sort of Hierarchical data that I can edit. What I'd like to do is pass an advanced data grid a hierarchical data structure with no leaf nodes. I tried creating a groupingCollection from flat data, passing that to a new HierarchicalData instance, but when I look at the data it looks flat and I can't traverse it like I would normally traverse a tree.

      var sBs:HierarchicalData = new HierarchicalData(groupingCollP);
      var sTs:HierarchicalCollectionView = new HierarchicalCollectionView(sBs);

      I also tried just using the grouping collection straight, which when looked at through the debugger is hierarchical. But... when I traverse each node I can only see the children properties, and have to way to add or remove a node which I would then pass back to the adg.

      var root:Object = groupingCollP.getRoot();

      I'm also trying stuff like

      myXML = new XML(groupingCollP)

      Man, I can't get it working. So my overall question is does somebody know how I can group flat data using a GroupingCollection and then traverse that collection adding / deleting / modifying nodes as I go. I'm not looking for the traversal algorithm, I have that. I just need to know how to get the data in the correct format.

      Thanks a million times a billion if anybody knows this.