Results 1 to 5 of 5

Thread: [FIXED] Grid data not rendered in TabPanel on none active tab

Hybrid View

Previous Post Previous Post   Next Post Next Post
    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member htammen's Avatar
    Join Date
    Jul 2010
    Location
    Germany, Hannover
    Posts
    74
    Vote Rating
    0
      0  

    Default [FIXED] Grid data not rendered in TabPanel on none active tab

    in a TabPanel data of a grid is currently not rendered if I reload the data from my backend and the tab thats the container of the grid is not the activeTab. If its the activeTab data is rendered correctly.

    Have a look at the following example.
    When "First tab" is active and I press the "Refresh" button the new data is not rendered in the grid of "Second tab". The initial store.loadData inside initComponent works fine.

    Any clues or is it a bug of the early preview version?

    PHP Code:
    Ext.require([
        
    'Ext.grid.*',
        
    'Ext.data.*',
        
    'Ext.util.*',
        
    'Ext.state.*'
    ]);

    Ext.define('SO.ux.dummy.GridInTabpanel', {
         
    extend'Ext.panel.Panel',
        
         
    myData: [
            {
    company:'3m Co'change:71.72pctChange0.02},
            {
    company:'Alcoa Inc'change:29.01pctChange0.42},
            {
    company:'Altria Group Inc'change:83.81pctChange0.28},
            {
    company:'American Express Company'change:52.55pctChange:0.01}
         ],

        
    initComponent: function() {
            var 
    store Ext.create('Ext.data.ArrayStore', {
                
    fields: [
                   {
    name'company'},
                   {
    name'change',     type'float'},
                   {
    name'pctChange',  type'float'}
                ],
                
    //data: this.myData
            
    });
            
            
    store.loadData(this.myDatafalse);
            
            
            
    Ext.apply(this, {
                
    xtype'panel',
                
    layout'fit',
                
    minWidth100,
                
    minHeight100,
                
    title'Container',
                
    items: [{
                    
    xtype'tabpanel',
                    
    activeTab0,
                    
    defaults: {
                        
    labelWidth150
                    
    },
                    
    deferredRenderfalse,
                    
    layoutConfig: {
                        
    deferredRenderfalse
                    
    },
                    
    ref'../../editPanel',
                    
    id'editPanel',
                    
    items: [
                        {
                            
    xtype'panel',
                            
    layout'vbox',
                            
    title'First Tab',
                            
    items: [
                                {
                                    
    xtype'textfield',
                                    
    width400,
                                    
    fieldLabel'Name',
                                    
    name'name',
                                    
    id'name'
                                
    }
                            ]
                        },
                        {
                            
    xtype'panel',
                            
    title'Second Tab',
                            
    layout'fit',
                            
    autoHeighttrue,
                            
    autoScrolltrue,
                            
    items: [
                                {
                                    
    xtype'gridpanel',
                                    
    storestore,
                                    
    autoHeighttrue,
                                    
    stripeRowstrue,
                                    
    autoExpandColumn1,
                                    
    id'myGrid',
                                    
    headers: [{
                                        
    id       :'company',
                                        
    text   'Company',
                                        
    //width: 120,
                                        
    flex1,
                                        
    sortable true
                                        
    dataIndex'company'
                                    
    },{
                                        
    text   'Change'
                                        
    width    75
                                        
    sortable true
                                        
    renderer this.change
                                        
    dataIndex'change'
                                    
    },{
                                        
    text   '% Change'
                                        
    width    75
                                        
    sortable true
                                        
    renderer this.pctChange
                                        
    dataIndex'pctChange'
                                    
    }]
                                }
                            ]
                        }
                        ]
                }],
                
    dockedItems: [{
                    
    xtype'toolbar',
                    
    dock'top',
                    
    items: [{
                            
    xtype'button',
                            
    text'Refresh',
                            
    id'btnRefresh'
                    
    }]
                }]
            });
            
    this.callParent(arguments);
            
            
    Ext.getCmp('btnRefresh').on('click'this.onRefreshthis);
        },
        
        
    onRefresh: function() {
            var 
    localData = [
                     {
    company:'ABC'change71.72pctChange0.02},
                     {
    company:'DEF'change29.01pctChange0.42},
                     {
    company:'GHI'change83.81pctChange0.28}
                 ]
            var 
    store Ext.getCmp('myGrid').store;
            
    store.loadData(localDatafalse);
                 
            
    Ext.Msg.alert('Refresh''Data has been refreshed');
        }
        
    }); 

  2. #2
    Sencha User
    Join Date
    Dec 2007
    Posts
    40
    Vote Rating
    0
      0  

    Default

    I noticed the same thing. From what I've seen, if you resize one of the grid's column, the data magically appears.

  3. #3
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,608
    Vote Rating
    874
      0  

    Default

    This is a bug, we'll look into it. Thanks.
    Evan Trimboli
    Twitter - @evantrimboli

  4. #4
    Ext JS Premium Member htammen's Avatar
    Join Date
    Jul 2010
    Location
    Germany, Hannover
    Posts
    74
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by Seboss View Post
    I noticed the same thing. From what I've seen, if you resize one of the grid's column, the data magically appears.
    yes, but only for the column that is resized.

  5. #5
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,487
    Vote Rating
    146
      0  

    Default

    This will be fixed in the PR2 release coming out soon.
    Aaron Conran
    @aconran

Similar Threads

  1. [Solved] TabPanel with 2 grids only grid in active tab gets rendered
    By MacUnix in forum Ext 3.x: Help & Discussion
    Replies: 8
    Last Post: 8 Feb 2011, 4:57 AM
  2. TabPane(IGNORE) l with 2 grids only grid in active tab get rendered
    By MacUnix in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 3 Feb 2011, 6:57 AM
  3. [FIXED] FormPanel in a non active TabPanel: bad displacement
    By paolocavelli in forum Ext 3.x: Bugs
    Replies: 2
    Last Post: 12 Mar 2010, 10:36 AM
  4. Replies: 4
    Last Post: 18 Jan 2010, 11:21 AM
  5. Tabpanel sends only data from active panel?
    By Dumas in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 26 Mar 2009, 10:39 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •