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,832
    Vote Rating
    609
    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
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    79
    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

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