-
Notifications
You must be signed in to change notification settings - Fork 295
CellSelection
bitpshr edited this page Jan 25, 2013
·
8 revisions
The CellSelection mixin extends upon the functionality of the Selection mixin to provide selection at the cell level instead. Some key differences include:
grid = declare([Grid, Keyboard, CellSelection])({
selectionMode: "single",
});
- The
selection
object now stores a hash of hashes, where the outer hash is keyed by item ID and the inner hash is keyed by column ID. - The
dgrid-select
anddgrid-deselect
events still fire, but include acells
property containing an array of cell objects, rather than arows
property. - Whereas Selection's
select
,deselect
, andisSelected
methods look up the passed argument via List'srow
method, CellSelection looks it up via Grid'scell
method. - The
allowSelect
method is passed a cell object instead of a row object.