The node has three levels.

IsTreeExpanded must be true, the node is added when the tree button is clicked

node.expandTree(5);

I have the following problems. The tree button is displayed as minus.

Is there a solution?

Waiting for an answer.

The node has three levels.

IsTreeExpanded must be true, the node is added when the tree button is clicked

node.expandTree(5);

I have the following problems. The tree button is displayed as minus.

Is there a solution?

Waiting for an answer.

First, I assume you mean that the diagram is a tree that has three levels.

Second, I don’t understand what you mean when you say “IsTreeExpanded must be true, the node is added when the tree button is clicked”. This is highly ambiguous.

Third, what does `node.expandTree(5)`

do in your scenario?

Fourth, as you can see in the definition of the “TreeExpanderButton” that is in extensions/Buttons.js, whether or not the button shows a plus or a minus is data bound to **Node.isTreeExpanded**. If you are explicitly making the child nodes not **visible**, that will not affect the **Node.isTreeExpanded** state of the parent node. So how did you get into this situation?

Waiting for an answer.

I want to know the final level count of this tree.

node.expandTree(5) // 5 – final level(Depth) count of this tree.

To determine the depth of the tree you’ll need walk the tree recursively.