【发布时间】:2011-12-31 18:35:25
【问题描述】:
我在网格中有以下代码:
var grid = Ext.create('Ext.grid.Panel', {
store: store,
stateful: true,
stateId: 'stateGrid',
columns: [
{
text : 'Job ID',
width : 75,
sortable : true,
dataIndex: 'id'
},
{
text : 'File Name',
width : 75,
sortable : true,
dataIndex: 'filename',
listeners : {
'mouseover' : function(iView, iCellEl,
iColIdx, iRecord, iRowEl, iRowIdx, iEvent) {
var zRec = iView.getRecord(iRowEl);
alert(zRec.data.id);
}
}
...等等...
我不知道如何获取行中第一列的单元格值。我也试过:
var record = grid.getStore().getAt(iRowIdx); // Get the Record
alert(iView.getRecord().get('id'));
有什么想法吗?
提前致谢!
【问题讨论】:
-
我觉得你很亲密。试试
alert(record.get('id'));而不是iView.getRecord...
标签: javascript extjs extjs4 javascript-framework