public/javascripts/yui/datatable/datatable.js
function(oRequest, oResponse, oPayload) {
    if((this instanceof DT) && this._sId) {
        this.fireEvent("dataReturnEvent", {request:oRequest,response:oResponse,payload:oPayload});
    
        // Pass data through abstract method for any transformations
        var ok    = this.doBeforeLoadData(oRequest, oResponse, oPayload),
            pag   = this.get('paginator'),
            index = 0;
    
        // Data ok to set
        if(ok && oResponse && !oResponse.error && lang.isArray(oResponse.results)) {
            // Update Records
            if (this.get('dynamicData')) {
                if (oPayload && oPayload.pagination &&
                    lang.isNumber(oPayload.pagination.recordOffset)) {
                    index = oPayload.pagination.recordOffset;
                } else if (pag) {
                    index = pag.getStartIndex();
                }
                
                this._oRecordSet.reset(); // Bug 2290604: dyanmic data shouldn't keep accumulating by default
            }
    
            this._oRecordSet.setRecords(oResponse.results, index | 0);
    
            // Update state
            this._handleDataReturnPayload(oRequest, oResponse, oPayload);
            
            // Update UI
            this.render();
        }
        // Error
        else if(ok && oResponse.error) {
            this.showTableMessage(this.get("MSG_ERROR"), DT.CLASS_ERROR);
        }
    }
    else {
    }
}
function(oRequest, oResponse, oPayload) {
    if((this instanceof DT) && this._sId) {
        this.fireEvent("dataReturnEvent", {request:oRequest,response:oResponse,payload:oPayload});
    
        // Pass data through abstract method for any transformations
        var ok    = this.doBeforeLoadData(oRequest, oResponse, oPayload),
            pag   = this.get('paginator'),
            index = 0;
    
        // Data ok to set
        if(ok && oResponse && !oResponse.error && lang.isArray(oResponse.results)) {
            // Update Records
            if (this.get('dynamicData')) {
                if (oPayload && oPayload.pagination &&
                    lang.isNumber(oPayload.pagination.recordOffset)) {
                    index = oPayload.pagination.recordOffset;
                } else if (pag) {
                    index = pag.getStartIndex();
                }
                
                this._oRecordSet.reset(); // Bug 2290604: dyanmic data shouldn't keep accumulating by default
            }
    
            this._oRecordSet.setRecords(oResponse.results, index | 0);
    
            // Update state
            this._handleDataReturnPayload(oRequest, oResponse, oPayload);
            
            // Update UI
            this.render();
        }
        // Error
        else if(ok && oResponse.error) {
            this.showTableMessage(this.get("MSG_ERROR"), DT.CLASS_ERROR);
        }
    }
    else {
    }
}
function ( oRequest , oResponse , oPayload ) { if ( ( this instanceof DT ) && this . _sId ) { this . fireEvent ( "dataReturnEvent" , { request : oRequest , response : oResponse , payload : oPayload } ) ; // Pass data through abstract method for any transformations var ok = this . doBeforeLoadData ( oRequest , oResponse , oPayload ) , pag = this . get ( 'paginator' ) , index = 0 ; // Data ok to set if ( ok && oResponse && ! oResponse . error && lang . isArray ( oResponse . results ) ) { // Update Records if ( this . get ( 'dynamicData' ) ) { if ( oPayload && oPayload . pagination && lang . isNumber ( oPayload . pagination . recordOffset ) ) { index = oPayload . pagination . recordOffset ; } else if ( pag ) { index = pag . getStartIndex ( ) ; } this . _oRecordSet . reset ( ) ; // Bug 2290604: dyanmic data shouldn't keep accumulating by default } this . _oRecordSet . setRecords ( oResponse . results , index | 0 ) ; // Update state this . _handleDataReturnPayload ( oRequest , oResponse , oPayload ) ; // Update UI this . render ( ) ; } // Error else if ( ok && oResponse . error ) { this . showTableMessage ( this . get ( "MSG_ERROR" ) , DT . CLASS_ERROR ) ; } } else { } }
Callback function receives reponse from DataSource and populates the
RecordSet with the results.

@method onDataReturnSetRows
@param oRequest {MIXED} Original generated request.
@param oResponse {Object} Response object.
@param oPayload {MIXED} (optional) Additional argument(s)
Callback function receives reponse from DataSource and populates the RecordSet with the results .