SpreadJS 14
GC.Spread.Sheets Namespace / Worksheet type / clearPendingChanges Method
The clear change info.
The row index of clearing range.
The col index of clearing range.
The row count of clearing range.
The col count of clearing range.
The type of clearing pending change, contains dirty/insert/delete, default is dirty.
In This Topic
    clearPendingChanges Method
    In This Topic
    Clears the dirty, insert, and delete status from the current worksheet.
    Syntax
    var instance = new GC.Spread.Sheets.Worksheet(name);
    var value; // Type: any
    value = instance.clearPendingChanges(clearChangeInfo,
                                         clearChangeInfo.row,
                                         clearChangeInfo.col,
                                         clearChangeInfo.rowCount,
                                         clearChangeInfo.colCount,
                                         clearChangeInfo.clearType);
    function clearPendingChanges( 
       (optional) clearChangeInfo : Object,
       (optional) clearChangeInfo.row : number,
       (optional) clearChangeInfo.col : number,
       (optional) clearChangeInfo.rowCount : number,
       (optional) clearChangeInfo.colCount : number,
       (optional) clearChangeInfo.clearType : ClearPendingChangeType
    ) : any;

    Parameters

    clearChangeInfo
    The clear change info.
    clearChangeInfo.row
    The row index of clearing range.
    clearChangeInfo.col
    The col index of clearing range.
    clearChangeInfo.rowCount
    The row count of clearing range.
    clearChangeInfo.colCount
    The col count of clearing range.
    clearChangeInfo.clearType
    The type of clearing pending change, contains dirty/insert/delete, default is dirty.
    Example
    This example clears the dirty cells.
    var customers = [
                   { ID: 0, Name: 'A', Info1: 'Info0' },
                   { ID: 1, Name: 'B', Info1: 'Info1' },
                   { ID: 2, Name: 'C', Info1: 'Info2' },
                ];
                activeSheet.autoGenerateColumns = true;
                activeSheet.setDataSource(customers);
    
    $("#button1").click(function () {
    activeSheet.clearPendingChanges();
       });
    
    // Add button control to page
    <input type="button" id="button1" value="button1"/>
    See Also

    Reference

    Worksheet type