PDA

View Full Version : Disabling the some checkboxselectionmodel based on the condition



SharmilaUmasankar
28 Aug 2012, 4:24 AM
Hi

Am trying to disable some checkboxselection model inserted in grid .I have tried with the beforerowselect listener of the checkboxselection .
var checkbox= new Ext.grid.CheckboxSelectionModel({
listeners: {
"beforerowselect" : function (sm, rowIndex, keep, rec) {
var id = parseInt(rec.id);
if (id=='24'){
return false;
}
}
}
});
coumns1.push(checkbox);

This listener is not triggered when the row is selected.Is there anyway to disable the checkboxselection model based on some criteria?

scottmartin
30 Aug 2012, 6:57 PM
This may help: (post #4)
http://www.sencha.com/forum/showthread.php?237641/

Scott.

vietits
30 Aug 2012, 7:18 PM
Which Ext version are you using? With Ext 4.1.1, Ext.selection.CheckboxModel does not fire 'beforerowselect' event but instead it fires 'beforeselect' event.