static/ext/src/selection/Model.js
function(startRow, endRow, keepExisting) {
        var me = this,
            store = me.store,
            i,
            toSelect = [];

        if (me.isLocked()){
            return;
        }

        if (!keepExisting) {
            me.deselectAll(true);
        }

        if (!Ext.isNumber(startRow)) {
            startRow = store.indexOf(startRow);
        }
        if (!Ext.isNumber(endRow)) {
            endRow = store.indexOf(endRow);
        }

        // swap values
        if (startRow > endRow){
            i = endRow;
            endRow = startRow;
            startRow = i;
        }

        for (i = startRow; i <= endRow; i++){
            if (!me.isSelected(store.getAt(i))) {
                toSelect.push(store.getAt(i));
            }
        }
        me.doMultiSelect(toSelect, true);
    }
function(startRow, endRow, keepExisting) {
        var me = this,
            store = me.store,
            i,
            toSelect = [];

        if (me.isLocked()){
            return;
        }

        if (!keepExisting) {
            me.deselectAll(true);
        }

        if (!Ext.isNumber(startRow)) {
            startRow = store.indexOf(startRow);
        }
        if (!Ext.isNumber(endRow)) {
            endRow = store.indexOf(endRow);
        }

        // swap values
        if (startRow > endRow){
            i = endRow;
            endRow = startRow;
            startRow = i;
        }

        for (i = startRow; i <= endRow; i++){
            if (!me.isSelected(store.getAt(i))) {
                toSelect.push(store.getAt(i));
            }
        }
        me.doMultiSelect(toSelect, true);
    }
function ( startRow , endRow , keepExisting ) { var me = this , store = me . store , i , toSelect = [ ] ; if ( me . isLocked ( ) ) { return ; } if ( ! keepExisting ) { me . deselectAll ( true ) ; } if ( ! Ext . isNumber ( startRow ) ) { startRow = store . indexOf ( startRow ) ; } if ( ! Ext . isNumber ( endRow ) ) { endRow = store . indexOf ( endRow ) ; } // swap values if ( startRow > endRow ) { i = endRow ; endRow = startRow ; startRow = i ; } for ( i = startRow ; i <= endRow ; i ++ ) { if ( ! me . isSelected ( store . getAt ( i ) ) ) { toSelect . push ( store . getAt ( i ) ) ; } } me . doMultiSelect ( toSelect , true ) ; }
Selects a range of rows if the selection model {@link #isLocked is not locked}.
All rows in between startRow and endRow are also selected.
@param {Ext.data.Model/Number} startRow The record or index of the first row in the range
@param {Ext.data.Model/Number} endRow The record or index of the last row in the range
@param {Boolean} keepExisting (optional) True to retain existing selections
Selects a range of rows if the selection model {