Select all parent Node

hi,

I am using a tree. I want that if I select a child node on double or single click then all node till root should be heightlighted. I tried to write a double click event. I am able to change the color of selected node. But How i can change the color of all nodes till root. Please suggest.

If you look at the SubGraphApp sample, you’ll see in the upper left “For any node, highlight all:”



Select a node, and then pick “Source Nodes”. Source nodes is “up” the tree. This sample only goes one level, but it should be obvious how to extend this.