View Full Version : EditorGridPanel and CheckboxSelectionModel

3 Apr 2011, 10:32 AM
I would like to use the CheckboxSelectionModel in my EditorGridPanel, but I don't want a row's checkbox to get checked by clicking any other field on the row except the checkbox column itself. Is that easily done?
Also, do I add my checkbox event listeners (rowselect, rowdeselect etc) in with the other listeners (beforeedit, after edit etc) in the grid config, or should they be separately defined in the CheckboxSelectionModel ?

TIA for help.

3 Apr 2011, 4:35 PM
Found answer here: http://notepad2.blogspot.com/2009/11/extjs-checkboxselectionmodel-disable.html#comment-form. My thanks to Wilson for his blog post.

Extjs CheckboxSelectionModel: Disable Row Selection Model But Keep Checkbox Selections

var MyCheckboxSelectionModel = Ext.extend(Ext.grid.CheckboxSelectionModel, {
// Disable the default rowselection model function
handleMouseDown : Ext.emptyFn

22 Jul 2011, 7:15 AM
You can actually achieve this functionality by using the checkOnly option in the CheckboxSelectionModel config.

checkOnly : Boolean
true if rows can only be selected by clicking on the checkbox column (defaults to false).