View Full Version : MultiCellSelectionModel along with CheckboxModel

22 Sep 2014, 6:26 AM
Hi ,

In my current project we are using grid and checkbox selection model for displaying checkboxes in it , selecting rows,deleting those rows , adding new rows to the before or next of currently selected rows.

However new requirement came up to support multicell selection almost like Excel functionality. MultiCellSelectionModel posted here (http://www.sencha.com/forum/showthread.php?214050-Multicell-selection-mode-on-grid)offers some of the feature we are looking for.
But it seems either I could keep checkbox model (RowModel) or multicell selection model (CellModel), and not both .

Is there any way by which I can implement both the functionality ?

23 Sep 2014, 9:01 PM

The cellmodel selection model doesn't allow for multiple cells to be selected at the same time you can use the cellmodel selection model and the check column to achieve what you're looking for I'd think.

6 Oct 2014, 1:15 AM

Thanks for the reply and Sorry for replying it late.

I could able to achieve required functionality using MutliCellSelectionModel and injecting CheckboxModel in it. I had to handle cellClick and cellKeyDown event on Grid to achieve it.

in MultiCellSelectionModel constructor

this.checkboxModel = Ext.create('Ext.selection.CheckboxModel',{
checkOnly: me.checkOnly,
injectCheckbox: me.injectChaeckbox
In controller on cellKeyDown-

var selModel = view.getSelectionModel().checkboxModel;

Thanks again for your suggestions.

7 Oct 2014, 2:44 AM
i think u can use checkbox selection model and inside that u can specify the mode config for multiselect/Single select.