Hi,
I’m putting the finishing touches on my checkbox tree, and need two buttons: “Check All” and “Uncheck All”. Could you help me to figure this out before I purchase this script?
I’m not a Javascript expert, but I figured out the Expand All feature tree.openAllItems(0);
Now I just need a Check All Feature
Cheers,
Drew
There is no ready to use methods but you can use next code snippets
to check all
var ids=tree.getAllSubItems(0).split(","); // get IDs of all items
for (var i=0; i<ids.length; i++) // for each item
tree.setCheck(ids[i],1); // set check
to uncheck all
var ids=tree.getAllSubItems(0).split(",");
for (var i=0; i<ids.length; i++)
tree.setCheck(ids[i],0);