DeLe
DeLe

Reputation: 2480

Extjs CheckboxModel - Checkonly not working in grid.plugin.CellEditing

I have grid panel with CheckboxModel in http://jsfiddle.net/Zsby6/

selModel: Ext.create('Ext.selection.CheckboxModel', {
        checkOnly: true,
        mode: 'MULTI'
    }),

I have option checkOnly: true that mean rows can only be selected by clicking on the checkbox column.


But when i click checkall like

enter image description here

and then i click Lisa then 'allchecked' change to 'uncheck' and only select this row like

enter image description here

I want when i click a cell in Name column then all checkbox will not impact. How to do that? Thank

Upvotes: 1

Views: 3152

Answers (1)

Dev
Dev

Reputation: 3932

I think checkOnly config works only for Extjs 3.x version. You can try this approach :

listeners: {
        cellclick: function (sender, td, cellIndex, record, tr, rowIndex, e, eOpts) {
            clickedColIndex = cellIndex;
        },
        beforedeselect: function (rowmodel, record, index, eOpts) {
           return (clickedColIndex == 0);
        }
}

Here is the fiddle

Upvotes: 3

Related Questions