Selecting all the checkboxes inside the treenodes on a butto

Hi,



I would like to know whether is it possible to select all the checkboxes with the tree.

I am using the below code now var rootsAr = tree.getSubItems(0).split(“,”)



for(var i=0;i<rootsAr.length;i++){

tree.openAllItems(rootsAr[i]);

//tree.setCheck(rootsAr[i],true)

tree.setSubChecked(rootsAr[i],true)

}

But only the checkboxes in the last node alone is showing as checked after the operation.

Please help me out.


Hello,


you have asked the same question by email. The reply is already sent.

It is not working. Only the checkboxes in the first node alone is selected.


We have tested the following approach - it works correctly:





tree.loadXML(“xml.php”,function(){
tree.openAllItemsDynamic(0)
});
tree.attachEvent(“onAllOpenDynamic”,function(){
tree.setSubChecked(0,true)
})

Please, provide the dirrect link to the problematic page (you can send it to support@dhtmlx.com)