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
2235
prevent data from collapsing a node if child nodes are checked.
posted

I have a datatree with many nodes and child nodes. I use check boxes in a template. I have it set so that when you click on a node it expands and collapses. However when there is a child node that is checked I want to cancel the collapse method...

 

Can you help with this?

Parents
No Data
Reply
  • 37874
    posted

    Hi Daryl007,

    You can use something similar to this function for NodeCollapsing client-side event:

    function WebDataTree1_NodeCollapsing(sender, eventArgs)

    {

        var node = eventArgs.getNode();

        var childrenCount = node.get_childrenCount();

        for (var i = 0; i < childrenCount; i++) {

            if (node.get_childNode(i).get_checkState() == 1) {

                eventArgs.set_cancel(true);

            }

        }

    }

    Let me know if this helps.

Children