的第二標籤,同時訪問一個tabpanel的第二選項卡的網格行我m到處未定義的值。訪問一個tabpanel
我已經創建了下面的代碼一個tabpanel:
xtype: 'tabpanel',
border: false,
deferredRender: true,
region: 'center',
activeTab: 0,
items:[{
id: 'availableoperators',
itemId: 'ops-operators-grid',
xtype: 'chat.dashboard.opsmall',
title: 'Operators',
region: 'center'
}, {
id: 'availableagents',
itemId: 'ops-agents-grid',
xtype: 'chat.dashboard.opsmgrid',
title: 'Agents',
region: 'center'
}]
這裏我米試圖訪問第二板行:
var opsGrid = Ext.getCmp('availableagents');
var records = opsGrid.store.getRange(0, opsGrid.store.getTotalCount());
for(var i = 0; i < records.length; i++) {
var row = opsGrid.getView().getRow(i);
}
上面的代碼工作正常,只有當我使用的ID第一個標籤。任何幫助,將不勝感激。
感謝您的解決方案。它的作品:) – ashhad