How to Avoid Some Nodes in Tree But not In Diagram?

Hi ,
I have 3 nodes 1 acts as Parent, another 2 acts as childs. i need to show only value of one child in Tree insted of all three.
but in my case these 3 nodes are displaying in tree. how can i avoid remaining 2 nodes in tree.?
but i need all three nodes in diagram.

I am unsure of what you mean. But I will guess and suggest that you put all of the nodes that you do not want to show in a Layer that you make not visible.

My requirement is :
in Diagram:==>Nodes are like these

here black circle is parent node and BH and SL are childs.

In Tree: ==> Nodes are Displayed like this

here my requirement is instead of all three nodes i have to display only BH in i need to remove those two(oil and SL) in Tree.

on the nodes you want to hide, you can set

node.visible = false;

however you want, including with a data binding. They will still be in the model and in the Diagram, but take up no space and not participate in layouts, etc.

thanks Simon. i will try this.

But i am displaying only node name in Tree. in this case empty space is coming between can i unvisible name in tree?. If i given like node.visible=false. total node will be hidden in both tree and Diagram. but i need the node will be in diagram but node name not in Tree.

Actually I need to know how to set visibility for a node in diagram and disable visibility for that node in tree view. Could you please tell me.

So you have two Diagrams, both showing some kind of tree structure? Are you now having those two Diagrams sharing the same Model (either TreeModel or GraphLinksModel)?

It sounds as if you will need to have two different models, because what you want to show is structurally different from each other. That way you will add and remove nodes in each model independently, so you no longer have to set Node.visible.

yes i have two diagrams one for Main Diagram View another one for Tree View Diagram.i am passing node data array of Main Diagram view to Tree View. from that i am getting names of nodes and showing in Tree. but Both parent and child names are displaying on that tree. but i need to show only parent name? could you help me?

I just told you – use two different models, without sharing the nodeDataArray.