PDA

View Full Version : Toggle tree node checkbox click without firing checkchange event



hbopuri
2 Jan 2015, 2:27 PM
I want to set a tree node checkboxto true without firing the "checkchange" event. How can I do that.

i tried below

node.parentNode.ui.checkbox.setAttribute("checked", "checked");

but it doesn't work.
if I do the toggle, it will fire the "checkchange" event

node.parentNode.getUI().toggleCheck(true);

lumberjack
7 Jan 2015, 2:03 PM
You could suspend events on your treepanel instance right before you toggle the checkbox, then resume events after the toggle.



if (suspendTreeEvents) {
tree.suspendEvents();
}
tree.getRootNode().firstChild.ui.toggleCheck(true);
tree.resumeEvents();


Regards,
Brian

g1b

hbopuri
7 Jan 2015, 3:04 PM
Thanks that worked

hbopuri
7 Jan 2015, 3:14 PM
Can you please help me with this issue?

http://stackoverflow.com/questions/27826186/check-all-child-nodes-of-a-ext-tree-asynctreenode