【发布时间】:2013-01-21 09:29:01
【问题描述】:
我觉得回答这个问题很简单:
我的自定义商店有简单的网格:
//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 中获取完整的行吗? 谢谢!
【问题讨论】:
-
你找到解决方案了吗?
-
是的,检查我自己的答案
标签: javascript extjs datagrid extjs4