This is actually a tricky little problem, if only because Sencha documentation is lacking.
The CheckboxModel does indeed have a beforeselect event inherited from Ext.selection.RowModel. However, there's no easy way to get the column index because frankly, that's the point of the RowModel.
However, there's an undocumented event in Ext.view.Table (which your grid will inherit) called beforecellmousedown. Here's the event parameters:
- view: The view of your grid
- cell: The cell that was clicked
- cellIndex: Index of the cell
- record: The store record associated with the cell
- row: The row of the cell
- rowIndex: Index of the row
- eOpts: Standard event option event
So you would probably try something like this:
viewConfig: {
listeners: {
beforecellmousedown: function(view, cell, cellIdx, record, row, rowIdx, eOpts){
if(cellIdx === indexOfLastColumnInGrid){
return false;
}
}
}
}
Both the cell and row indexes are zero-based.