I have created a grid with extjs 4. The selection.CheckboxModel is implemented to. This means that the row is selected/deselected wherever you click on the particular row. Now i want to disable this selection on the last column since it contains custom buttons. (I don't want to select the row if a button is clicked).
Any idea's how to do this?
Many thanks in advance!
Read this article http://www.learnsomethings.com/2012/01/12/stopping-a-checkbox-from-allowing-select-in-an-extjs-4-grid-checkbox-column-via-the-ext-selection-checkboxmodel/ I hope it will help you.
This is actually a tricky little problem, if only because Sencha documentation is lacking.
The CheckboxModel does indeed have a
beforeselect
event inherited fromExt.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) calledbeforecellmousedown
. Here's the event parameters:So you would probably try something like this:
Both the cell and row indexes are zero-based.
Thanx Eric. This i the final solution!