1 Reply Latest reply on Dec 21, 2007 10:52 AM by m_hartnett

    how to reflect tree after adding a new branch


      I have a tree, onDrag of a branch (having leaf nodes) to the drop location,
      i have the following code.
      private function addNewNode(event:DragEvent, newNode:XML):void {
      var dropTarget:Tree = Tree(event.currentTarget);
      var treeNode:ICollectionView = dropTarget.dataProvider as ICollectionView;
      var treeCursor:IViewCursor = treeNode.createCursor();
      var treeNode1:XML = treeCursor.current as XML;
      var pXMLList:XMLList = new XMLList(treeNode1).children();
      pXMLList[pXMLList.length()] = newNode;
      trace("after adding new node: " + treeNode1); // this prints correctly.
      But the modified tree at the drop location after adding a new branch is not getting reflected.
      I am really stuck at this point. Not sure how to proceed.

      Please advice.