我有一个树网格,有两列持续时间和一个复选框列。我想要的是,当我选择/取消选中复选框时,我应该得到工期列值。这是我尝试过的代码,但不知道如何访问工期值。
{
xtype: 'nacheckcolumn', //only display checkbox on leaf items(tasks)
header: 'N/A',
dataIndex: 'NA',
menuDisabled: true,
width: 60,
sortable: false,
editor: {
xtype: 'checkbox',
cls: 'x-grid-checkheader-editor'
},
listeners: {
'checkchange': function (column, recordIndex, checked) {
console.log(checked);
if(checked === true) {
}
}
}
}发布于 2015-07-21 10:58:34
从recordIndex获取记录:
var record = column.up('grid').getStore().getAt(recordIndex) 然后获取所需列的值:
var duration = record.get('duration') 合起来:
'checkchange': function (column, recordIndex, checked) {
console.log(checked);
if(checked === true) {
var record = column.up('grid').getStore().getAt(recordIndex),
duration = record.get('duration')
}
} https://stackoverflow.com/questions/31514447
复制相似问题