Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
WebTree's Node Check Box From ClientSide AddChild Method
posted

I am trying to add a checkbox to a node in the tree. The nodes are being added to the tree from the javascript.

 

var loNewNode = loWebTreeNode.addChild("Node Name");

How can I enable the check box from the client side (without inserting in the innerHTML of the element). Is there anyway with out turning on the checkboxes for all nodes? I have not been able to find it. Thanks.

P.S. To clarify, the check boxes are not required for the whole tree, just the leafs. (which are not root nodes)

 

 

Parents
No Data
Reply
  • 15
    posted

    Well, just in case anyone is intetrested, I have found a what seems to be a hack to make this work.

     

    Before adding the nodes that you want checkboxes on (showing for) change the master checkboxes property on the main tree object to true. When done adding, set the property back to false.

     

     

     //TURN ON CHECKBOXES if children
    if (!Does not have children)
         igtree_getTreeById(webTreeId).CheckBoxes = true;

    var loNewNode = loWebTreeNode.addChild("Name");

    //turn check box off

    igtree_getTreeById(webTreeId).CheckBoxes = false;

Children
No Data