PDA

View Full Version : Disable checkbox in checkbox selection model



akihirokun
7 Jul 2010, 12:24 AM
Hi all,

Currently i use checkbox selection model for my grid. I would like to know how i can disable some checkbox according to the row data condition. However, i still need that row (with the disabled checkbox) is enabled to be selected. I have made this code earlier:


var checkBoxSelMod = new Ext.grid.CheckboxSelectionModel({
listeners:{
// prevent selection of records with invalid descriptions
beforerowselect: function(selModel, rowIndex, keepExisting, record) {
if ((record.get('Status') == 'approved') || (record.get('Status') == 'rejected')) {
return false;
}
}
}
});

but, it prevented the selection of the row as well.

Thank you in advance


Ridho