define("dojox/grid/DataSelection", [ "dojo/_base/declare", "./_SelectionPreserver", "./Selection" ], function(declare, _SelectionPreserver, Selection){ return declare("dojox.grid.DataSelection", Selection, { constructor: function(grid){ if(grid.keepSelection){ this.preserver = new _SelectionPreserver(this); } }, destroy: function(){ if(this.preserver){ this.preserver.destroy(); } }, getFirstSelected: function(){ var idx = Selection.prototype.getFirstSelected.call(this); if(idx == -1){ return null; } return this.grid.getItem(idx); }, getNextSelected: function(inPrev){ var old_idx = this.grid.getItemIndex(inPrev); var idx = Selection.prototype.getNextSelected.call(this, old_idx); if(idx == -1){ return null; } return this.grid.getItem(idx); }, getSelected: function(){ var result = []; for(var i=0, l=this.selected.length; i