我認爲這是很簡單的回答了這個問題:得到一排ExtJS的4
我有簡單的網格,我的客戶商店:
//other code
{
xtype: 'grid',
store: 'SecondStore',
itemId: 'mainTabPanel2',
columns: [
//this is not from the store
{
header: 'Not Form Store',
id: 'keyId2',
},
//from the store
{
header: 'From Store',
dataIndex: 'label',
id: 'keyId',
}
]
}
店裏只填充第二列id:keyId。其實它有:
fields: [{ name: 'label' }]
而且這個工作很好。
我想從這個網格的第n 1行的函數中獲得。
handler: function() {
var grid = Ext.ComponentQuery.query('grid[itemId="mainTabPanel2"]')[0];
//var row= get row(1) <- i don't know how to get the complete row
}
我與ExtJS的4個工作,所以我不能用命令讓它grid.getView().getRow(1);
我不能從商店得到它,因爲我想也得到柱與內容ID:keyId2未存儲在店裏,所以我不能做這樣的事情:
grid.getStore().getAt(1);
任何人都知道如何獲得完整的行ExtJS的4? 謝謝!
您是否找到解決方案但Marco? – sina
是的,檢查我自己的答案 – Marco