Spread.Sheets Documentation
getDirtyCells Method
GC.Spread.Sheets Namespace > Worksheet type : getDirtyCells Method
The row index.
The column index.
The number of rows in the range of dirty cells.
The number of columns in the range of dirty cells.
Gets the dirty cell collection.
Syntax
var instance = new GC.Spread.Sheets.Worksheet(name);
var value; // Type: Array
value = instance.getDirtyCells(row, col, rowCount, colCount);
function getDirtyCells( 
   row : number,
   col : number,
   rowCount : number,
   colCount : number
) : Array;

Parameters

row
The row index.
col
The column index.
rowCount
The number of rows in the range of dirty cells.
colCount
The number of columns in the range of dirty cells.
Example
This example gets 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 () {
var dirtyCells = activeSheet.getDirtyCells();
var len = dirtyCells.length;
   if (len > 0) {
       for (var i = 0; i < len; i++) {
          var cell = dirtyCells[i];
          alert("row:" + cell.row + "   " + "col:" + cell.col + "    " + "oldValue:" + cell.oldValue + "    " + "newValue:" + cell.newValue);
                   }
         }
   });

//Add a button control to the page
<input type="button" id="button1" value="button1"/>
See Also

Reference

Worksheet type