-
2 Dec 2008 5:35 AM #51
Checkchange was the first thing I tried. The reason I went with onCheckboxClick was to know what box was clicked from within the event.
And I think the checkchange event is acting inconsistently when unchecking boxes.
When I check Leaf 2, the checkchange will fire twice (Parent and Leaf 2), correctly.Code:[ ] Grandparent [ ] Parent [ ] Leaf 1 [ ] Leaf 2 [ ] Leaf 3 [ ] Leaf 4
But, when I uncheck Leaf 2 it will fire 6 times(!). Twice for Leaf 2 and once for each node (Parent, Leaf 1, Leaf 3, Leaf 4).
onCheckboxClick fires only once. And I can easily see if the node is a parent and what nodes should be added into/removed from the array.
Please, tell me if I've missed something using the checkchange event.
-
2 Dec 2008 6:53 AM #52Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
There should be an extra check in onCheckChange:
after which you could use:Code:Ext.override(Ext.tree.TreeNodeUI, { onCheckChange :function(){ var checked = this.isChecked(); if(checked !== this.node.attributes.checked){ this.node.attributes.checked = checked; this.fireEvent('checkchange', this.node, checked); } } });
Code:listeners:{ checkchange: function(node, checked){ if(!node.isLeaf()){ node.expand(); } } }
-
3 Dec 2008 9:41 PM #53
enableDD not working ?
enableDD not working ?
thanks for the contribution
when I turned on DD with enableDD:true, I am unable to rearrange nodes via DD
as is possible in the original Tree
am I missing something ?
thx
-
8 Dec 2008 4:35 AM #54
enableDD:true just works in IE correctly
enableDD:true just works in IE correctly
great job with that tri-state Tree

But i agree with cruisin and when i'm enableDD, i have some trouble with the firefox. I start the drag and everything works fine until i want to drag the node anywhere. If i release the button nothing happens and it freeze the drag, so i could not end the drag.
In Internet Explorer everything works ok.
Do i forget anything?
Thx
-
17 Dec 2008 7:35 AM #55
Please replace archive after last override.
Thanks..
-
17 Dec 2008 7:48 AM #56
-
17 Dec 2008 5:48 PM #57
-
17 Dec 2008 9:43 PM #58Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
The TreeCheckbox.css file contains a reference to the checkbox.gif file. Make sure it points to the correct file if you put the example in a different directory.
-
18 Dec 2008 10:45 PM #59
-
23 Dec 2008 3:19 AM #60


Reply With Quote
