开发者

Extjs 4.x - CheckboxModel to get checked and unchecked value

I have used check box model in the grid panel. When i checke开发者_运维问答d the check box i am the checked column value. Now what i need is when i unchecked i need to get that same unchecked value.

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

Thanks in advance.

Regards,

Riyaz


This is the answer:

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);
        }
    }
})
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜