Opened 10 years ago

Closed 9 years ago

Last modified 8 years ago

#10855 closed defect (fixed)

EnhancedGrid Indirect Selection Sorting

Reported by: denov Owned by: evan
Priority: high Milestone: 1.6
Component: DojoX Grid Version: 1.4.1
Keywords: Cc:
Blocked By: Blocking:

Description

you can see the bug in the demo for indirect selection on http://docs.dojocampus.org/dojox/grid/EnhancedGrid

if you select a couple rows and then sort the grid the records all get sorted but selected rows do now change to reflect the sort. So if you sort by movie title, select the first row, and then reverse the sort you'll see the wrong row is now selected.

Attachments (1)

selection-preserver.patch (9.6 KB) - added by evan 9 years ago.
With this patch selection will be persisted across various use actions, e.g. sorting, filtering or pagination etc. Applicable both for client/server side stores. But there is a key precondition - Identifier(id) is required for store, as id is used for differentiating row items. Known issue - The preserved selections might be inaccurate if some unloaded rows are selected by range(e.g.SHIFT + click) To turn on this - set 'keepSelection' attribute to true, e.g. <div dojoType="dojox.grid.EnhancedGrid" keepSelection = true .../>

Download all attachments as: .zip

Change History (13)

comment:1 Changed 10 years ago by Douglas Hays

Owner: changed from bryanforbes to Bryan Forbes

comment:2 Changed 10 years ago by bill

Owner: changed from Bryan Forbes to Eavn

looks like these are ones that evan is working on

comment:3 Changed 10 years ago by bill

Owner: changed from Eavn to Evan

comment:4 Changed 9 years ago by evan

It's a known issue for single sorting in DataGrid?.

This is fixed when nested sorting turned on in EnhancedGrid?, please see the first demo on http://docs.dojocampus.org/dojox/grid/EnhancedGrid EnhancedGrid? inherits the single sorting when nested sorting is off - I think that's the reason why you saw this issue.

In the latest nightly build, this feature is disabled by default and only applicable in EnhancedGrid? with client data store, you can turn it on with <div dojoType="dojox.grid.EnhancedGrid?" keepSortSelection="true" .../>

comment:5 Changed 9 years ago by Adam Peller

see also #10509

comment:6 Changed 9 years ago by bill

Owner: changed from Evan to evan

Changed 9 years ago by evan

Attachment: selection-preserver.patch added

With this patch selection will be persisted across various use actions, e.g. sorting, filtering or pagination etc. Applicable both for client/server side stores.
But there is a key precondition - Identifier(id) is required for store, as id is used for differentiating row items.
Known issue - The preserved selections might be inaccurate if some unloaded rows are selected by range(e.g.SHIFT + click)
To turn on this - set 'keepSelection' attribute to true, e.g.
<div dojoType="dojox.grid.EnhancedGrid" keepSelection = true .../>

comment:7 Changed 9 years ago by Evan

Resolution: fixed
Status: newclosed

(In [23422]) With this patch, selection will be persisted across various user actions, e.g. sorting, filtering or pagination etc.

  • Applicable both for client/server stores.

Key precondition

  • Store Identifier(id) is required since id is used for differentiating row items.

Known issue

  • The preserved selections might be inaccurate if some unloaded rows are selected by range(e.g.SHIFT + click)

Usage

  • To turn on this, please set 'keepSelection' attribute to true, e.g. <div dojoType="dojox.grid.EnhancedGrid?" keepSelection = true .../>

Fixes #10855 !strict

comment:8 Changed 9 years ago by evan

(In [23667]) Refs #10855, fix missed scenario - select/deseelct all vs. unloaded rows are selected/deselected by range(e.g.SHIFT + click), !strict

comment:9 Changed 9 years ago by evan

Milestone: tbd1.6

comment:10 Changed 8 years ago by evan

(In [25497]) Refs #10855 shouldn't keep _connects[] in class scope

comment:11 Changed 8 years ago by evan

(In [25579]) Fixes #7304 !strict by leveraging selection persistence across DataGrid?, TreeGrid/LazyTreeGrid?. Refs #10855

The selection persistence feature is still limited with

  1. Key precondition - Store Identifier(id) is required since id is used for differentiating row items.
  1. Known issue - might not be accurate if some unloaded rows are selected by range(e.g.SHIFT + click)

Usage - To turn on this, please set 'keepSelection' attribute to true, e.g. <div dojoType="dojox.grid.DataGrid?" keepSelection = true .../> or

<div dojoType="dojox.grid.TreeGrid?" keepSelection = true .../> or <div dojoType="dojox.grid.LazyTreeGrid?" keepSelection = true .../>

comment:12 Changed 8 years ago by evan

(In [25580]) Refs #10855 !strict use this.inherited() after the fix of #7304, refs #7304

Note: See TracTickets for help on using tickets.