2010-03-25 2 views
0

그리드의 저장소에 항목을 추가하면 그 순간 그리드가 표시되지 않고 그리드에 항목이 채워지지 않습니다. 이 문제에 대한 수정 또는 해결 방법이 있습니까?GridPanel에 방금 추가 한 항목이 표시되지 않는 경우

var tbar = { 
    items: [{ 
     text: 'add some lines', 
     handler: function() { 
      Ext.getCmp('grid-panel').store.loadData([[1, 'aaaaa'], [2, 'bbbbb']]); 
     } 
    }] 
}; 

Ext.onReady(function() { 
    var p = new Ext.TabPanel({ 
     renderTo: 'panel-div', 
     width: 500, 
     height: 350, 
     title: '123123', 
     activeItem: 1, 
     items: [{ 
      title: 'tab1', 
      tbar: tbar 
     },{ 
      title: 'tab2', 
      layout: 'fit', 
      tbar: tbar, 
      items: { 
       xtype: 'grid', 
       hideHeaders: true, 
       id: 'grid-panel', 
       autoExpandColumn: 'text', 
       columns: [{id: 'text', header: 'Category', width: 1, dataIndex: 'text'}], 
       store: new Ext.data.ArrayStore({ 
        fields: ['id', 'text'] 
       }) 
      } 
     }] 
    }); 
}); 

답변

0

grid.getView() 그리드를 다시로드한다) (새로 고침 : - (그리드가 비어있는 버튼을 클릭 한 뒤 "TAB2"로 전환 "TAB1"로 전환) 여기

코드입니다. .

+0

아니요, 실제로 버그예요 http://www.extjs.com/forum/showthread.php?t=95233 –

관련 문제