1. #1
    Sencha User
    Join Date
    Jun 2011
    Location
    Bangalore, India
    Posts
    145
    Answers
    3
    Vote Rating
    1
    renganathan is on a distinguished road

      0  

    Default Unanswered: How to expand particular node in tree panel - Extjs 4

    Unanswered: How to expand particular node in tree panel - Extjs 4


    hi all,

    i would like to know , How to expand the particular node in the tree panel?

    Please share ur experience.
    Thanks,

    RENGANATHAN M G

  2. #2
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,338
    Answers
    498
    Vote Rating
    248
    skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of

      0  

    Default


    Nodes have an expand method:

    http://docs.sencha.com/ext-js/4-0/#!...-method-expand

    A node can also be created expanded:

    http://docs.sencha.com/ext-js/4-0/#!...e-cfg-expanded

    Trees have an expandPath method:

    http://docs.sencha.com/ext-js/4-0/#!...hod-expandPath

    The format used by expandPath is compatible with getPath:

    http://docs.sencha.com/ext-js/4-0/#!...method-getPath

  3. #3
    Sencha User
    Join Date
    Jun 2011
    Location
    Bangalore, India
    Posts
    145
    Answers
    3
    Vote Rating
    1
    renganathan is on a distinguished road

      0  

    Default


    Hi,

    can u give some working example?
    Thanks,

    RENGANATHAN M G

  4. #4
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,338
    Answers
    498
    Vote Rating
    248
    skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of

      0  

    Default


    You haven't given enough information on what you're trying to do for us to provide you with an example.

  5. #5
    Sencha User
    Join Date
    Jun 2011
    Location
    Bangalore, India
    Posts
    145
    Answers
    3
    Vote Rating
    1
    renganathan is on a distinguished road

      0  

    Default expand particular node in tree panel

    expand particular node in tree panel


    Code:
         var invTreeStore         = Ext.create('Ext.data.TreeStore', 
        {
                proxy                : {
                type                  : 'ajax',
                url                    : 'lab_tree.class.php'//'get_tree_nodes.php'
            },
            root                : {
                text            : 'Labs',
                id                : '0|getLabs',
                expanded        : true
            },
            folderSort            : true,
            sorters                : [{
                property        : 'text',
                direction        : 'ASC'
            }]
        });
        
        
        
            var labTree             = Ext.create('Ext.tree.Panel', 
        {
            //title                : 'labTree',
            renderTo            : Ext.getBody(),
            id                    : 'labTree',
            lines                : true,
            autoHeight             : true,
            containerScroll        : true,
            autoScroll            : true,
            frame                :true,
            iconCls                : 'icon-basket',
            style                : 'padding-bottom: 5px', 
            store                : invTreeStore,//powerTreeStore,
            rootVisible            : false,
            //collapsed            : true,
            listeners            : 
            {
                    itemclick      : function clickListener (view, rec, item, index, eventObj) 
            { 
    
                labhidden.setValue(rec.raw.chain['lab']);
                
                aislehidden.setValue(rec.raw.chain['aisle']);
                
                aislelochidden.setValue(rec.raw.chain['aisle_location']);
                
                deviceStore.load();
    
                    
            }
            
            },
            
             dockedItems: [{
                xtype: 'toolbar',
                items: [{
                    text: 'Expand All',
                    handler: function(){
                        labTree.expandAll();
                    }
                }, {
                    text: 'Collapse All',
                    handler: function(){
                        labTree.collapseAll();
                    }
                }]
            }]
        });

    This is my code for tree panel. i want to expand one particular node by default.
    Thanks,

    RENGANATHAN M G

  6. #6
    Sencha User
    Join Date
    Feb 2012
    Posts
    5
    Vote Rating
    0
    Pramma is on a distinguished road

      0  

    Default try this

    try this


    If you know the Id of the node you can do tree.expandPath(store.getNodeById(id).getPath())

Thread Participants: 2

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar