public/javascripts/yui/datatable/datatable-debug.js
function(row, oData) {
    var index = row;
    if (!lang.isNumber(index)) {
        index = this.getRecordIndex(row);
    }

    // Update the Record
    if(lang.isNumber(index) && (index >= 0)) {
        var oRecordSet = this._oRecordSet,
            oldRecord = oRecordSet.getRecord(index);
            
        
        if(oldRecord) {
            var updatedRecord = this._oRecordSet.setRecord(oData, index),
                elRow = this.getTrEl(oldRecord),
                // Copy data from the Record for the event that gets fired later
                oldData = oldRecord ? oldRecord.getData() : null;
               
            if(updatedRecord) {
                // Update selected rows as necessary
                var tracker = this._aSelections || [],
                i=0,
                oldId = oldRecord.getId(),
                newId = updatedRecord.getId();
                for(; i<tracker.length; i++) {
                    if((tracker[i] === oldId)) {
                        tracker[i] = newId;
                    }
                    else if(tracker[i].recordId === oldId) {
                        tracker[i].recordId = newId;
                    }
                }

                // Update the TR only if row is on current page
                this._oChainRender.add({
                    method: function() {
                        if((this instanceof DT) && this._sId) {
                            // Paginated
                            var oPaginator = this.get('paginator');
                            if (oPaginator) {
                                var pageStartIndex = (oPaginator.getPageRecords())[0],
                                    pageLastIndex = (oPaginator.getPageRecords())[1];
        
                                // At least one of the new records affects the view
                                if ((index >= pageStartIndex) || (index <= pageLastIndex)) {
                                    this.render();
                                }
                            }
                            else {
                                if(elRow) {
                                    this._updateTrEl(elRow, updatedRecord);
                                }
                                else {
                                    this.getTbodyEl().appendChild(this._addTrEl(updatedRecord));
                                }
                            }
                            this.fireEvent("rowUpdateEvent", {record:updatedRecord, oldData:oldData});
                            YAHOO.log("DataTable row updated: Record ID = " + updatedRecord.getId() +
                                    ", Record index = " + this.getRecordIndex(updatedRecord) +
                                    ", page row index = " + this.getTrIndex(updatedRecord), "info", this.toString());
                        }
                    },
                    scope: this,
                    timeout: (this.get("renderLoopSize") > 0) ? 0 : -1
                });
                this._runRenderChain();
                return;
            }
        }
    }
    YAHOO.log("Could not update row " + row + " with the data : " + lang.dump(oData), "warn", this.toString());
    return;
}
function(row, oData) {
    var index = row;
    if (!lang.isNumber(index)) {
        index = this.getRecordIndex(row);
    }

    // Update the Record
    if(lang.isNumber(index) && (index >= 0)) {
        var oRecordSet = this._oRecordSet,
            oldRecord = oRecordSet.getRecord(index);
            
        
        if(oldRecord) {
            var updatedRecord = this._oRecordSet.setRecord(oData, index),
                elRow = this.getTrEl(oldRecord),
                // Copy data from the Record for the event that gets fired later
                oldData = oldRecord ? oldRecord.getData() : null;
               
            if(updatedRecord) {
                // Update selected rows as necessary
                var tracker = this._aSelections || [],
                i=0,
                oldId = oldRecord.getId(),
                newId = updatedRecord.getId();
                for(; i<tracker.length; i++) {
                    if((tracker[i] === oldId)) {
                        tracker[i] = newId;
                    }
                    else if(tracker[i].recordId === oldId) {
                        tracker[i].recordId = newId;
                    }
                }

                // Update the TR only if row is on current page
                this._oChainRender.add({
                    method: function() {
                        if((this instanceof DT) && this._sId) {
                            // Paginated
                            var oPaginator = this.get('paginator');
                            if (oPaginator) {
                                var pageStartIndex = (oPaginator.getPageRecords())[0],
                                    pageLastIndex = (oPaginator.getPageRecords())[1];
        
                                // At least one of the new records affects the view
                                if ((index >= pageStartIndex) || (index <= pageLastIndex)) {
                                    this.render();
                                }
                            }
                            else {
                                if(elRow) {
                                    this._updateTrEl(elRow, updatedRecord);
                                }
                                else {
                                    this.getTbodyEl().appendChild(this._addTrEl(updatedRecord));
                                }
                            }
                            this.fireEvent("rowUpdateEvent", {record:updatedRecord, oldData:oldData});
                            YAHOO.log("DataTable row updated: Record ID = " + updatedRecord.getId() +
                                    ", Record index = " + this.getRecordIndex(updatedRecord) +
                                    ", page row index = " + this.getTrIndex(updatedRecord), "info", this.toString());
                        }
                    },
                    scope: this,
                    timeout: (this.get("renderLoopSize") > 0) ? 0 : -1
                });
                this._runRenderChain();
                return;
            }
        }
    }
    YAHOO.log("Could not update row " + row + " with the data : " + lang.dump(oData), "warn", this.toString());
    return;
}
function ( row , oData ) { var index = row ; if ( ! lang . isNumber ( index ) ) { index = this . getRecordIndex ( row ) ; } // Update the Record if ( lang . isNumber ( index ) && ( index >= 0 ) ) { var oRecordSet = this . _oRecordSet , oldRecord = oRecordSet . getRecord ( index ) ; if ( oldRecord ) { var updatedRecord = this . _oRecordSet . setRecord ( oData , index ) , elRow = this . getTrEl ( oldRecord ) , // Copy data from the Record for the event that gets fired later oldData = oldRecord ? oldRecord . getData ( ) : null ; if ( updatedRecord ) { // Update selected rows as necessary var tracker = this . _aSelections || [ ] , i = 0 , oldId = oldRecord . getId ( ) , newId = updatedRecord . getId ( ) ; for ( ; i < tracker . length ; i ++ ) { if ( ( tracker [ i ] === oldId ) ) { tracker [ i ] = newId ; } else if ( tracker [ i ] . recordId === oldId ) { tracker [ i ] . recordId = newId ; } } // Update the TR only if row is on current page this . _oChainRender . add ( { method : function ( ) { if ( ( this instanceof DT ) && this . _sId ) { // Paginated var oPaginator = this . get ( 'paginator' ) ; if ( oPaginator ) { var pageStartIndex = ( oPaginator . getPageRecords ( ) ) [ 0 ] , pageLastIndex = ( oPaginator . getPageRecords ( ) ) [ 1 ] ; // At least one of the new records affects the view if ( ( index >= pageStartIndex ) || ( index <= pageLastIndex ) ) { this . render ( ) ; } } else { if ( elRow ) { this . _updateTrEl ( elRow , updatedRecord ) ; } else { this . getTbodyEl ( ) . appendChild ( this . _addTrEl ( updatedRecord ) ) ; } } this . fireEvent ( "rowUpdateEvent" , { record : updatedRecord , oldData : oldData } ) ; YAHOO . log ( "DataTable row updated: Record ID = " + updatedRecord . getId ( ) + ", Record index = " + this . getRecordIndex ( updatedRecord ) + ", page row index = " + this . getTrIndex ( updatedRecord ) , "info" , this . toString ( ) ) ; } } , scope : this , timeout : ( this . get ( "renderLoopSize" ) > 0 ) ? 0 : - 1 } ) ; this . _runRenderChain ( ) ; return ; } } } YAHOO . log ( "Could not update row " + row + " with the data : " + lang . dump ( oData ) , "warn" , this . toString ( ) ) ; return ; }
For the given row, updates the associated Record with the given data. If the
row is on current page, the corresponding DOM elements are also updated.

@method updateRow
@param row {YAHOO.widget.Record | Number | HTMLElement | String}
Which row to update: By Record instance, by Record's RecordSet
position index, by HTMLElement reference to the TR element, or by ID string
of the TR element.
@param oData {Object} Object literal of data for the row.
For the given row updates the associated Record with the given data . If the row is on current page the corresponding DOM elements are also updated .