How to uncheck all tree nodes in Ext.tree.TreePanel?

mothee picture mothee · Dec 15, 2010 · Viewed 13.4k times · Source

I would like a 'reset' method to uncheck all the checked nodes in Ext.tree.TreePanel.

Answer

Mischa Kroon picture Mischa Kroon · Jan 28, 2011
tree.getRootNode().cascade(function(n) {
    var ui = n.getUI();
    ui.toggleCheck(false);
});

As found here: http://www.sencha.com/forum/showthread.php?12888-solved-programatically-unchecking-checked-tree-nodes&p=62845#post62845