Reputation: 1
I am using Dojo enhancedGrid (1.6) with indirectSelection plugin to generate checkboxes. I am having an issue with row selection and sorting.
Here is how to recreate the problem:
This issue is present in both dataGrid and enhancedGrid, even on the Dojo example page.
Is this a bug or is there a way to make the checkbox move with the row when sorting?
Upvotes: 0
Views: 2523
Reputation: 1665
Hope this still helps.
I had the same issue, and found out it is already solved and patched... (at least from dojo version 1.6)
In short, the only thig you need to do is this.
[in your EnhancedGrid] set 'keepSelection' attribute to true,
e.g.
<div dojoType="dojox.grid.EnhancedGrid" keepSelection = true .../>
also, note that there is a precondition: Identifier(id) is required for store, as id is used for differentiating row items
thats it! now any sorting, filtering or pagination actions in the grid will preserve the selections!
More info here: http://bugs.dojotoolkit.org/ticket/10855
Note: I'm using dojo version 1.6 and the patch mentioned in there is ALREADY applied to the dojo files, so you DO NOT NEED to apply such patch, just add the attribute to the grid, (and ensure your store is identified by the id.)
Upvotes: 1
Reputation: 11
Yes,it really is. I'm using dojo 1.7.1 release , and it still has this problem
what's more , when use grid.rowSelectCell.setDisabled(0, true), and then use dijit.byId("dataGrid").rowSelectCell.toggleAllSelection(true); the disabled checkboxes will still be selected.
badly, use gridDomNode.selection.getSelected(); will still select the rows with disabled checkboxes
Upvotes: 1