View Full Version : cell editing and checkbox selection

17 Oct 2012, 2:13 PM
I have the following grid:

xtype: 'gridpanelepl',
columnWidth: 1,
styleHtmlContent: false,
title: 'Choose which products to show. Drag rows to reorder.',
enableColumnHide: true,
enableColumnMove: false,
enableColumnResize: false,
forceFit: true,
store: 'RprodStore',
columns: [...],
viewConfig: {
plugins: {
ptype: 'gridviewdragdrop',
dragText: 'Drag and drop to reorganize',
ddGroup: 'ProdPanel'
selModel: Ext.create('Ext.selection.CheckboxModel', {
checkOnly: true,
mode: 'simple'
selType: 'cellmodel',
plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1

The selection and cell editing each behave on thier own beautifully, but when I click in a cell to edit, any other rows I had selected are deselected.
Is there a way/configuration to suppress deselection of other rows if I'm editing a cell?
(single mode just allows a single line to be selected, and multi does the same thing, while not allowing rows to be deselected with a click)

19 Oct 2012, 7:52 AM
The selection is actually going to happen before the cell is to be edited. Selection happens on mouse down where cell edit, even if you have clicksToEdit to 1, will happen on click.

30 Oct 2012, 7:58 AM
That does help clarify things. I did have another question about checkbox selection - I noticed that when I have checkbox selection and drag and drop set up on the same grid, selected rows will 'drag' together, and won't drag if all items are selected.

I think this is probably a feature - is there a way to disable it?