DeLe
DeLe

Reputation: 2480

Extjs 4.1 - CheckboxModel within checkcolumn in grid Fail?

I try to work with checkboxmodel and checkcolumn in http://jsfiddle.net/Veb7Q/. But i found a bug.
That is when i click checkboxmodel after i click checkcolumn I see no row is selected but when i click my button to get selected, It have ?

Here is my button to get selection

Ext.create('Ext.Button', {
        text: 'Click me',
        visible: false,
        renderTo: Ext.getBody(),
        handler: function() {
            //alert('You clicked the button!');
            var s = grid.getSelectionModel().getSelection();
            Ext.each(s, function (item) {
                alert(item.data.name);
            });
        }
    });


Follow my step you will see a bug
step 1: click checkboxmodel and you will see like below

enter image description here

step 2: click Active column and you will see like below enter image description here

step 3: click button "Click me" and you will see a bug like (no selection here? ). How to fix this bug. Thanks

enter image description here

Upvotes: 1

Views: 3516

Answers (1)

Hariharan
Hariharan

Reputation: 3263

Found it..

Just add "stopSelection : false" in your checkcolumn xtype @trungkien

, {
            xtype: 'checkcolumn',
            text: 'Active',
            dataIndex: 'active',
            stopSelection : false,
            align: 'center',
            defaultType: 'boolean'
        }

I hope this will work.

Upvotes: 1

Related Questions