1. #1
    Ext User
    Join Date
    May 2008
    Posts
    5
    Vote Rating
    0
    PeaC is on a distinguished road

      0  

    Default Card Question

    Card Question


    Sorry for my poor english.

    In my page,a tree with lots treenodes,when i click the node,show a cardpanel with this:
    HTML Code:
    Ext.getCmp('main-panel').layout.setActiveItem('grid-panel');
    The problem is:when i click different node,how can i pass a para to 'grid-panel',and show different data in 'grid-panel'?

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,120
    Vote Rating
    508
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Can you explain a bit more what you mean?

    Do you want a grid to load different data when a tab is clicked?

  3. #3
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,337
    Vote Rating
    75
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    if i understand you:

    Try: Ext.getCmp('grid-panel').store.loadData(yourDataHere)

  4. #4
    Ext User
    Join Date
    May 2008
    Posts
    5
    Vote Rating
    0
    PeaC is on a distinguished road

      0  

    Default


    Thanks for your fast reply.

    here is some code:
    HTML Code:
    listTree.on('click',function(node){
        if(node!=listTree.root)
            Ext.getCmp('main-panel').layout.setActiveItem('list-panel');
    });
    //I want to pass a para node.id to list-panel,but i do not know how to do.


    HTML Code:
    Ext.getCmp('list-panel').on('show',function(){
        //some code here use node.id
    });
    // this event only run once when other cardpanel change to this cardpanel.How to run it always when click different treenodes?

  5. #5
    Ext User
    Join Date
    May 2008
    Posts
    5
    Vote Rating
    0
    PeaC is on a distinguished road

      0  

    Default


    I got a method,but i do not know if it is a good solution.

    HTML Code:
    var LastNodeId = -1;
    tree.on('click',function(node){
        if(node!=tree.root)
        {
            Ext.getCmp('main-panel').layout.setActiveItem('list-panel');
     
            if(LastNodeId!=node.id)
            {
                LoadGridData(node.id); // LoadGridData is a function,with it i can load data to a grid.
                LastNodeId = node.id;
            }
        }
    });

Thread Participants: 2

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