Tri-State checkboxe functionality is not working, When a node is deleted.

2 posts, 0 answers
  1. Ravi Sanker
    Ravi  Sanker avatar
    6 posts
    Member since:
    Jun 2009

    Posted 25 Jul 2009 Link to this post


    When a node is deleted through client side javascript code, the tri-state check box functionality is not working as expected. 
    Check state of the ancestors of the deleted node are not updated. 

    Only parent of the deleted node's checkstate gets updated.  Grand Parent of the deleted node's check state is not updated. 

    please find below code for deleting a node.

    function DeleteNode(nodeID) { 
            var tree = $find("<%=  RadTreeView1.ClientID%>"); 
            var node = tree.findNodeByValue(nodeID); 

    But when a new node is added to the tree, corresponding ancestors check state is updated as expected. Adding a new node to the tree is not a problem.

    Please find below code for adding new node.
    function AddNewNode(newNodeID, title, direction, siblingNodeid, parentid) { 
            var tree = $find("<%=  RadTreeView1.ClientID%>"); 
            var pnode = tree.findNodeByValue(parentid); 
            var snode = tree.findNodeByValue(siblingNodeid); 
            var index = snode.get_index(); 
            var newnewnode = new Telerik.Web.UI.RadTreeNode(); 
            if (direction == "below") { 
                pnode.get_nodes().insert(index + 1, newnode); 
            } else { 
                pnode.get_nodes().insert(index, newnode); 
            var attributes = newnode.get_attributes(); 
            attributes.setAttribute("NodeName", title); 
            attributes.setAttribute("ParentID", parentid); 
            var html = ""
            var x = 0
            html += "&nbsp;<img src='../images/Q.gif' align='bottom' border='0'/>"; 
            x |= 1; 
            newnode.get_attributes().setAttribute("Properties", x); 
            newnode.get_textElement().innerHTML = title + html; 

    Please help me with this problem.

    Thanks in advance,

  2. Dimitar Milushev
    Dimitar Milushev avatar
    555 posts

    Posted 29 Jul 2009 Link to this post

    Hello Ravi Sanker,

    This was confirmed as a bug in RadTreeView. We are working on a fix and the fix will be included in the next Service Pack of the RadControls suite.

    Please excuse us for the inconvenience.

    Kind regards,
    Dimitar Milushev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top