-
Notifications
You must be signed in to change notification settings - Fork 295
selector
bitpshr edited this page Jan 26, 2013
·
8 revisions
Used in conjunction with the Selection mixin, the selector plugin dedicates a column to the purpose of rendering a selector component, providing alternate means for selecting and deselecting rows in a grid.
require([
"dojo/_base/declare", "dgrid/OnDemandGrid", "dgrid/selector"
], function(declare, Grid, selector){
var columns = {
col1: selector({ label: "Select" }),
col2: "Column 2"
};
...
});
A selector column can be used to allow selection even in a grid where selectionMode
is set to none
, in which case the controls in the selector column will be the only means by which a user may select or deselect rows. Also note that selector inputs will be disabled for rows for which allowSelect
returns false
.
The selector plugin supports the following additional column definition properties:
Property | Description |
---|---|
selectorType |
Specifies the type of selector component to use. Defaults to checkbox , but radio may also be specified, as a more appropriate choice for grids in single selection mode. |
Alternatively, selectorType
may be specified as the second argument to the selector
function instead of including it within the column definition.