What do you mean by “disable” | “enable” ?
By disable and enable i meant to disable the clicks on the tree and all its nodes and by enable i meant to enabling the same.
The pro version of tree supports
tree.lockTree(mode)
command ( dhtmlxtree_li.js ) need to be included.
You can use something similar to
tree.attachEvent(“onClick”,function(){
tree.lockTree(true)
});