Reputation: 2480
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
step 2: click Active column and you will see like below
step 3: click button "Click me" and you will see a bug like (no selection here? ). How to fix this bug. Thanks
Upvotes: 1
Views: 3516
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