pjekel / cbtree

The Dijit Tree with Multi State Checkboxes, project code 'cbtree' , is a highly configurable dojo/dijit tree with support for multi-state checkboxes or third party widgets capable of presenting a so-called 'checked' state.
Other
75 stars 34 forks source link

how to set the checkbox to false in the tree? #45

Closed ClementYap closed 10 years ago

ClementYap commented 10 years ago

Hi I would like to know how to set the checkbox in the tree , to false programmatically? The method I used to read is like:- "registry.byID("tree").attr("selectedItem").checked = false".

Please advise what is the right way?

pjekel commented 10 years ago

Try something like this

register.byId("tree").get("selectedItems").forEach(function (node) {
    node.set("checked", false);
});
ClementYap commented 10 years ago

Hi It does not work. With the highlighted node, I am not able to set this (leaf node) to false programmatically.