2 Replies Latest reply on May 7, 2009 12:27 AM by seiza13

    tree problem

    seiza13 Level 1

      Hi ,
      I am using this component and i need to find out the hierarchy of the parent of a selected child.Presently i am only able to find out the immediate parent of a child.How can i find the hierarchy of a particular child ie child,parent,grandparent,grand grandparent etc till the root
      how can i get this?

        • 1. Re: tree problem
          ntsiii Level 3

          Something like this below, but instead of expanding the node, build your ancestor chain:



            //starts at the given node, walks up the tree opening nodes as it goes
            private function expandParents(xmlNode:XML):void
              while (xmlNode.parent() != null) { 
                xmlNode = xmlNode.parent();
                myTree.expandItem(xmlNode,true, false);


          Tracy Spratt

          • 2. Re: tree problem
            seiza13 Level 1

            Thank you very much