1. #51
    Sencha User
    Join Date
    Aug 2008
    Location
    Gothenburg
    Posts
    157
    Vote Rating
    2
    Dr. Flink is on a distinguished road

      0  

    Default


    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.

    Code:
    [ ] Grandparent
        [ ] Parent
            [ ] Leaf 1
            [ ] Leaf 2
            [ ] Leaf 3
            [ ] Leaf 4
    When I check Leaf 2, the checkchange will fire twice (Parent and Leaf 2), correctly.
    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. #52
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    92
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    There should be an extra check in onCheckChange:
    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);
    		}
    	}
    });
    after which you could use:
    Code:
    listeners:{
    	checkchange: function(node, checked){
    		if(!node.isLeaf()){
    			node.expand();
    		}
    	}
    }

  3. #53
    Ext User
    Join Date
    Nov 2007
    Posts
    10
    Vote Rating
    0
    cruisin is on a distinguished road

      0  

    Cool 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

  4. #54
    Ext User
    Join Date
    Nov 2008
    Posts
    1
    Vote Rating
    0
    starmage is on a distinguished road

      0  

    Default 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

  5. #55
    Sencha User
    Join Date
    Jun 2008
    Posts
    77
    Vote Rating
    0
    PSB is on a distinguished road

      0  

    Default


    Please replace archive after last override.

    Thanks..

  6. #56
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    92
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Quote Originally Posted by PSB View Post
    Please replace archive after last override.
    I updated the original post to version 1.2 (not many changes, except one nasty bugfix).

  7. #57
    Ext User
    Join Date
    Sep 2008
    Posts
    6
    Vote Rating
    0
    snoir is on a distinguished road

      0  

    Default


    i downlaod it ,but no checkbox on tree

  8. #58
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    92
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    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.

  9. #59
    Ext User
    Join Date
    Oct 2008
    Posts
    11
    Vote Rating
    0
    Frenky is on a distinguished road

      0  

    Default


    excellent!!

    it works perfect for me

  10. #60
    Ext User
    Join Date
    Sep 2008
    Posts
    6
    Vote Rating
    0
    snoir is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    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.
    thx,the demo is right~