The CellSelection mixin extends upon the functionality of the Selection mixin
to provide selection at the cell level instead.
require([
'dojo/_base/declare',
'dgrid/OnDemandGrid',
'dgrid/CellSelection'
], function (declare, OnDemandGrid, CellSelection) {
var grid = new (declare([ OnDemandGrid, CellSelection ]))({
selectionMode: 'single',
// ...
});
});
selection object stores a nested hash, where the outer hash isdgrid-select and dgrid-deselect events still fire, but include acells property containing an array of cell objects, rather than a rowsselect, deselect, and isSelected methods look up therow method, CellSelection looks it up via Grid'scell method.allowSelect method is passed a cell object instead of a row object.