1. #1
    Sencha User
    Join Date
    May 2013
    Posts
    25
    Vote Rating
    1
    sowmyaranjan is on a distinguished road

      0  

    Default Unanswered: Treepanel expand/collapse on a node without children

    Unanswered: Treepanel expand/collapse on a node without children


    Hello

    I am using ExtJs 4.2.How to show the collapse/expand icon on a node without children in a tree panel.On expand and collapse it should fire all the events related to the tree pane.

    I tried adding

    1-children:[{}] gave me undefined property.
    2-loaded:true nothing happend
    3-singleExpand:true nothing happend


    Can any one please help on this.Special request to Sencha support team.

  2. #2
    Ext JS Premium Member
    Join Date
    Jul 2011
    Location
    Hyderabad, India
    Posts
    99
    Answers
    15
    Vote Rating
    21
    mdnaveed42 will become famous soon enough mdnaveed42 will become famous soon enough

      1  

    Default


    Hi,

    You need to use children: [], below is the sample code...

    Code:
    var store = Ext.create('Ext.data.TreeStore', {
        root: {
            expanded: true,
            children: [
                { text: "detention", leaf: true },
                { text: "homework", expanded: true, children: [] },
                { text: "buy lottery tickets", leaf: true }
            ]
        }
    });
    
    
    Ext.create('Ext.tree.Panel', {
        title: 'Simple Tree',
        width: 200,
        height: 150,
        store: store,
        rootVisible: false,
        renderTo: Ext.getBody()
    });
    Hope this helps

    Thanks,
    Md Naveed

  3. #3
    Sencha User
    Join Date
    May 2013
    Posts
    25
    Vote Rating
    1
    sowmyaranjan is on a distinguished road

      0  

    Default


    I tried the above but its not showing the expand/collapse icon whose having empty children.

  4. #4
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    3,383
    Answers
    146
    Vote Rating
    62
    Gary Schlosberg is a jewel in the rough Gary Schlosberg is a jewel in the rough Gary Schlosberg is a jewel in the rough

      0  

    Default


    I'm not sure this can be done, as I don't believe it's designed to display that way. That said, I was able to get the expand icon to display by removing the 'children' config entirely, but no collapse (minus) icon appears when it is expanded.
    Get on the Fast Track with Sencha Training http://sencha.com/training

    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: sheryl@sencha.com

  5. #5
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,311
    Answers
    13
    Vote Rating
    109
    LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light

      0  

    Default


    Did you try leaf false?

  6. #6
    Sencha User
    Join Date
    May 2013
    Posts
    25
    Vote Rating
    1
    sowmyaranjan is on a distinguished road

      0  

    Default


    i tried leaf:false as well but it didnt work. So it means there are some limitations.

  7. #7
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,311
    Answers
    13
    Vote Rating
    109
    LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light

      0  

    Default


    Did you try leaf: false and children:[] together?

  8. #8
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    3,383
    Answers
    146
    Vote Rating
    62
    Gary Schlosberg is a jewel in the rough Gary Schlosberg is a jewel in the rough Gary Schlosberg is a jewel in the rough

      0  

    Default


    My understanding is that it is the plus/minus icons are desired, despite the lack of child nodes, which doesn't seem possible. Apologies if I misunderstood.
    Get on the Fast Track with Sencha Training http://sencha.com/training

    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: sheryl@sencha.com

  9. #9
    Sencha User
    Join Date
    Nov 2007
    Posts
    135
    Vote Rating
    0
    new2ext is on a distinguished road

      0  

    Default


    In the node config, set
    Code:
    allowChildren: true
    and leave off
    Code:
    children: []
    .

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi