dojo.provide("dojox.grid.DataSelection"); dojo.require("dojox.grid.Selection"); dojo.declare("dojox.grid.DataSelection", dojox.grid.Selection, { getFirstSelected: function(){ var idx = dojox.grid.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 = dojox.grid.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