Reputation: 2871
I have a dgrid with selection extention.
how can I be able to select any row without checking the box.
I mean, I can check to check box only if I click on it directly.
Upvotes: 0
Views: 1308
Reputation: 10559
The wording in your question's description sounds a little bit off from your question's title, but I think what you're asking is how to allow selecting rows only via a checkbox in a selector column. You can do this with a combination of the Selection
mixin with selectionMode: 'none'
and a column using the selector
column plugin. Here's a rough example:
require([
'dojo/_base/declare',
'dgrid/Grid',
'dgrid/Selection',
'dgrid/selector'
], function (declare, Grid, Selection, selector) {
var SelectionGrid = declare([Grid, Selection]);
var grid = new SelectionGrid({
columns: {
selector: selector({ label: '' }),
// other columns here...
},
selectionMode: 'none'
});
// Place, startup the grid, and add data here...
});
You can see examples like this in dgrid's test/selector.html
page.
Upvotes: 3