Gets the depth of the TreeNode in the TreeView hierarchy.
Namespace: MindFusion.Common.UI
File: TreeNode.js
SyntaxJavaScript
Copy Code
|
|---|
get level() {} |
Number. A zero-based index of the depth.
ExampleThe following code checks the level of the first TreeNode in a TreeView:
JavaScript
Copy Code
|
|---|
| if(treeView.items[0].level == 0) { //do something } |
See Also