dojox/grid/_SelectionPreserver (version 1.10)

Summary

Preserve selections across various user actions.

When this feature is turned on, Grid will try to preserve selections across actions, e.g. sorting, filtering etc.

Precondition - Identifier(id) is required for store since id is the only way for differentiating row items. Known issue - The preserved selections might be inaccurate if some unloaded rows are previously selected by range(e.g.SHIFT + click)

Usage

var foo = new _SelectionPreserver(selection);
dojox/grid/_SelectionPreserver
Parameter Type Description
selection undefined

Examples

Example 1

//To turn on this - please set 'keepSelection' attribute to true
<div dojoType="dojox.grid.DataGrid" keepSelection = true .../>
<div dojoType="dojox.grid.TreeGrid" keepSelection = true .../>
<div dojoType="dojox.grid.LazyTreeGrid" keepSelection = true .../>

Method Summary

Methods

_reSelectById(item,index)

When some rows is fetched, determine whether it should be selected.

Parameter Type Description
item undefined
index undefined
_selectById(toSelect,inItemOrIndex)

Record selected rows by ID.

Parameter Type Description
toSelect undefined
inItemOrIndex undefined
Returns:undefined
destroy()
reset()
Error in the documentation? Can’t find what you are looking for? Let us know!