2

我在网格面板中使用了复选框模型。当我选中复选框时,我是选中的列值。现在我需要的是当我取消选中时我需要获得相同的未选中值。

var selModel = Ext.create('Ext.selection.CheckboxModel', {
    checkOnly: true,
    listeners: {
        selectionchange: function(model, records) {
            if (records[0]) {
                id = records[0].get('id');
                alert(id);
            }
        }
    }
});

提前致谢。

问候,

里亚兹

4

1 回答 1

1

这是答案:

var selModel = Ext.create('Ext.selection.CheckboxModel', {
    checkOnly: true,
    listeners: {
        deselect: function(model, record, index) {
            id = record.get('id');
            alert(id);
        },
        select: function(model, record, index) {
            id = record.get('id');
            alert(id);
        }
    }
})
于 2011-07-16T11:23:31.453 回答