How to get the parent of a tree node?

View: New views
1 Messages — Rating Filter:   Alert me  

How to get the parent of a tree node?

by Terry Reinert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Is there a way to get the parent of an item in a tree? If it matters I am using a XmlStore as the data source for the Tree with a TreeStoreModel in between.

 

Some insight into what I am wanting to do…

 

My XML file has a series of children elements that each contain a heading number (think of it like an outline). When a tree node is clicked on, I generate some information and display it on a different part of the page. Part of that information is a combination of the headings from every parent of the node up the tree. For example…

 

Node1 Heading = 1

-> Node2 Heading = 2

-> -> Node3 Heading = 3

 

When Node3 is clicked on, I want to generate the string 1.2.3 to display on the page. But having the Node3 item I can only get Node3’s Heading number.

 

Thanks.


_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest