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
40
No Client side event on Uncheck
posted

My tree is defined as:

 <ignav:UltraWebTree
                ID="OrganizationalUnitTree"
                WebTreeTarget="HierarchicalTree"
                CheckBoxes="true"
                runat="server">
                <ClientSideEvents NodeChecked="TreeNodeChecked" />
</ignav:UltraWebTree>

 And the script is:

function TreeNodeChecked(treeId, nodeId, bChecked)
{
    var selectedNode = igtree_getNodeById(nodeId);
    var childNodes = selectedNode.getChildNodes();

    if (bChecked)
    {
        for (n in childNodes)
        {
            childNodesNo.setChecked(bChecked);
        }
    }
}
 

Shouldnt this get an event when I uncheck a checkbox? Whenever I uncheck a checkbox, I want all the children unchecked as well. 

Parents
No Data
Reply
  • 21382
    posted

     I am by no means a WebTree expert, but you have

      if (bChecked)
     {

     

    Wouldn't bChecked be false when you uncheck, thereby skipping over the code in question. 

Children