PDA

View Full Version : TreeNode's checkchange event


lpetrov
11-19-2007, 10:41 PM
Then I dblclick the textNode's label, it's checkbox is marked as checked, but no events are executed, neither 'node.attributes.checked' is marked as true/false.

I'm new to ExtJs, so maybe this isnt the way of bugfixing it but it works as tempory fix for me :)

tree.on("dblclick",function(node,evt) {
node.attributes.checked = !node.attributes.checked;
this.fireEvent("checkchange", node, node.attributes.checked);
});


...and maybe if you need to disable the checkbox change on dblclick use this code in the the on("dblclick")...:
node.ui.checkbox.checked = node.attributes.checked;
(Useful, when adding TreeEditor to TreeNodes with `checked` enabled)

brian.moeskau
11-20-2007, 02:49 AM
Can you provide the html/code that you are using?

lpetrov
11-20-2007, 03:25 AM
The JS code is ~386 lines of code + ~30 lines of CSS + dynamic PHP pages 8-|
I'll try to reproduce it with some of the example pages later today/tomo.