1. #1
    Ext User
    Join Date
    Jan 2009
    Posts
    10
    Vote Rating
    0
    hebee is on a distinguished road

      0  

    Default Adding multiple Grids to a TabPanel

    Adding multiple Grids to a TabPanel


    I'm working on a project where i have a grid in that is used to select a name. Upon double-clicking on a name, a new tab which contains the data in a grid for the selected name has to be added to a tabpanel. The title of the tab should be the selected person's name. I manage to create one tab, but upon clicking a different name, the data in the just generated tab disapears and the tab's title is not updated. What i want is that a new tab opens with the just selected person's data, or if that's not possible, that the old tab updates with a another person's data.

    My code so far looks something like this:

    Code:
    ...
    listeners: {
        rowdblclick: function(namegrid, rowIndex, e){
          var record = namegrid.getStore().getAt(rowIndex).get('id');
          var name = namegrid.getStore().getAt(rowIndex).get('name');
          store = new Ext.data.Store({
          id: 'store',
          proxy: new Ext.data.HttpProxy({...}),
          baseParams:{...},
          reader: new Ext.data.JsonReader({...});
          pb = new Ext.PagingToolbar( {...});
          cm = new Ext.grid.ColumnModel(...);
          grid = new Ext.grid.EditorGridPanel({...});
          store.load({... });
          center.add(grid);
          center.setActiveTab(grid);
       }
    }
    ...

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,499
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    All the Stores get the same ID 'store' do they?

  3. #3
    Ext User
    Join Date
    Jan 2009
    Posts
    10
    Vote Rating
    0
    hebee is on a distinguished road

      0  

    Default


    Uh, yeah. Changed the id to a variable and it works. Now I feel really stupid .

    Thanks

Thread Participants: 1

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