When I make a grid like this:
Ext.create('Ext.grid.Panel', {
title: 'Simpsons',
store: Ext.data.StoreManager.lookup('simpsonsStore'),
columns: [
{ text: 'Name', dataIndex: 'name' },
{ text: 'Email', dataIndex: 'email', flex: 1 },
{ text: 'Phone', dataIndex: 'phone' }
],
height: 200,
width: 400,
selType: 'checkboxmodel',
selModel: {
injectCheckbox: 1,
mode: 'SIMPLE'
},
viewConfig: {
plugins: [
{ ptype: 'gridviewdragdrop' }
]
},
})
I don’t want the checkboxes checked when dragging because:
- I only want to drag one item at a time,
- I want to be able to multiselect for other actions.
I can add a listener to deselectAll after the drop but:
- This leaves the item selected if I start to drag but change my mind and
- This means I cannot stop multiple items dragging.
Sound to me like you should be using the grids default selection model with a the ux ‘checkcolumn’ that is provided with the extjs library. This would let you be able to select rows for reorder independent of a checkbox selection of the row.