public/javascripts/yui/datatable/datatable.js
function() {
    var sMode = this.get("selectionMode");
    var oTrigger = {};
    var oTriggerCell, oTriggerRecord, nTriggerRecordIndex, elTriggerRow, nTriggerTrIndex;

    // Cell mode
    if((sMode == "cellblock") || (sMode == "cellrange") || (sMode == "singlecell")) {
        oTriggerCell = this.getLastSelectedCell();
        // No selected cells found
        if(!oTriggerCell) {
            return null;
        }
        else {
            oTriggerRecord = this.getRecord(oTriggerCell.recordId);
            nTriggerRecordIndex = this.getRecordIndex(oTriggerRecord);
            elTriggerRow = this.getTrEl(oTriggerRecord);
            nTriggerTrIndex = this.getTrIndex(elTriggerRow);

            // Selected cell not found on this page
            if(nTriggerTrIndex === null) {
                return null;
            }
            else {
                oTrigger.record = oTriggerRecord;
                oTrigger.recordIndex = nTriggerRecordIndex;
                oTrigger.el = this.getTdEl(oTriggerCell);
                oTrigger.trIndex = nTriggerTrIndex;
                oTrigger.column = this.getColumn(oTriggerCell.columnKey);
                oTrigger.colKeyIndex = oTrigger.column.getKeyIndex();
                oTrigger.cell = oTriggerCell;
                return oTrigger;
            }
        }
    }
    // Row mode
    else {
        oTriggerRecord = this.getLastSelectedRecord();
        // No selected rows found
        if(!oTriggerRecord) {
                return null;
        }
        else {
            // Selected row found, but is it on current page?
            oTriggerRecord = this.getRecord(oTriggerRecord);
            nTriggerRecordIndex = this.getRecordIndex(oTriggerRecord);
            elTriggerRow = this.getTrEl(oTriggerRecord);
            nTriggerTrIndex = this.getTrIndex(elTriggerRow);

            // Selected row not found on this page
            if(nTriggerTrIndex === null) {
                return null;
            }
            else {
                oTrigger.record = oTriggerRecord;
                oTrigger.recordIndex = nTriggerRecordIndex;
                oTrigger.el = elTriggerRow;
                oTrigger.trIndex = nTriggerTrIndex;
                return oTrigger;
            }
        }
    }
}
function() {
    var sMode = this.get("selectionMode");
    var oTrigger = {};
    var oTriggerCell, oTriggerRecord, nTriggerRecordIndex, elTriggerRow, nTriggerTrIndex;

    // Cell mode
    if((sMode == "cellblock") || (sMode == "cellrange") || (sMode == "singlecell")) {
        oTriggerCell = this.getLastSelectedCell();
        // No selected cells found
        if(!oTriggerCell) {
            return null;
        }
        else {
            oTriggerRecord = this.getRecord(oTriggerCell.recordId);
            nTriggerRecordIndex = this.getRecordIndex(oTriggerRecord);
            elTriggerRow = this.getTrEl(oTriggerRecord);
            nTriggerTrIndex = this.getTrIndex(elTriggerRow);

            // Selected cell not found on this page
            if(nTriggerTrIndex === null) {
                return null;
            }
            else {
                oTrigger.record = oTriggerRecord;
                oTrigger.recordIndex = nTriggerRecordIndex;
                oTrigger.el = this.getTdEl(oTriggerCell);
                oTrigger.trIndex = nTriggerTrIndex;
                oTrigger.column = this.getColumn(oTriggerCell.columnKey);
                oTrigger.colKeyIndex = oTrigger.column.getKeyIndex();
                oTrigger.cell = oTriggerCell;
                return oTrigger;
            }
        }
    }
    // Row mode
    else {
        oTriggerRecord = this.getLastSelectedRecord();
        // No selected rows found
        if(!oTriggerRecord) {
                return null;
        }
        else {
            // Selected row found, but is it on current page?
            oTriggerRecord = this.getRecord(oTriggerRecord);
            nTriggerRecordIndex = this.getRecordIndex(oTriggerRecord);
            elTriggerRow = this.getTrEl(oTriggerRecord);
            nTriggerTrIndex = this.getTrIndex(elTriggerRow);

            // Selected row not found on this page
            if(nTriggerTrIndex === null) {
                return null;
            }
            else {
                oTrigger.record = oTriggerRecord;
                oTrigger.recordIndex = nTriggerRecordIndex;
                oTrigger.el = elTriggerRow;
                oTrigger.trIndex = nTriggerTrIndex;
                return oTrigger;
            }
        }
    }
}
function ( ) { var sMode = this . get ( "selectionMode" ) ; var oTrigger = { } ; var oTriggerCell , oTriggerRecord , nTriggerRecordIndex , elTriggerRow , nTriggerTrIndex ; // Cell mode if ( ( sMode == "cellblock" ) || ( sMode == "cellrange" ) || ( sMode == "singlecell" ) ) { oTriggerCell = this . getLastSelectedCell ( ) ; // No selected cells found if ( ! oTriggerCell ) { return null ; } else { oTriggerRecord = this . getRecord ( oTriggerCell . recordId ) ; nTriggerRecordIndex = this . getRecordIndex ( oTriggerRecord ) ; elTriggerRow = this . getTrEl ( oTriggerRecord ) ; nTriggerTrIndex = this . getTrIndex ( elTriggerRow ) ; // Selected cell not found on this page if ( nTriggerTrIndex === null ) { return null ; } else { oTrigger . record = oTriggerRecord ; oTrigger . recordIndex = nTriggerRecordIndex ; oTrigger . el = this . getTdEl ( oTriggerCell ) ; oTrigger . trIndex = nTriggerTrIndex ; oTrigger . column = this . getColumn ( oTriggerCell . columnKey ) ; oTrigger . colKeyIndex = oTrigger . column . getKeyIndex ( ) ; oTrigger . cell = oTriggerCell ; return oTrigger ; } } } // Row mode else { oTriggerRecord = this . getLastSelectedRecord ( ) ; // No selected rows found if ( ! oTriggerRecord ) { return null ; } else { // Selected row found, but is it on current page? oTriggerRecord = this . getRecord ( oTriggerRecord ) ; nTriggerRecordIndex = this . getRecordIndex ( oTriggerRecord ) ; elTriggerRow = this . getTrEl ( oTriggerRecord ) ; nTriggerTrIndex = this . getTrIndex ( elTriggerRow ) ; // Selected row not found on this page if ( nTriggerTrIndex === null ) { return null ; } else { oTrigger . record = oTriggerRecord ; oTrigger . recordIndex = nTriggerRecordIndex ; oTrigger . el = elTriggerRow ; oTrigger . trIndex = nTriggerTrIndex ; return oTrigger ; } } } }
Returns object literal of values that represent the selection trigger. Used
to determine selection behavior resulting from a key event.

@method _getSelectionTrigger
@private
Returns object literal of values that represent the selection trigger . Used to determine selection behavior resulting from a key event .