Search code examples
javascriptdhtmlx

Dhtmlx tree api undefined


I am trying to use some api http://docs.dhtmlx.com/api__dhtmlxtree_saveselecteditem.html to save the state of a tree in my project but every time is undefined :

undefined is not a function

This is the code:

tree_1.setImagePath('./codebase/thirdparty/dhtmlxtree/imgs/dhxtree_'+"skyblue"+'/');
tree_1.enableItemEditor(1);
tree_1.enableCheckBoxes(1);
tree_1.enableThreeStateCheckboxes(true);


tree_1.saveSelectedItem("ww");// undefined is not a function

Solution

  • It is a "PRO" method. If you haven't it - this method will not work