The dirty concept is defined as:
In general, only changing a cell value causes it to be dirty.
If the cell is dirty, the current row is also dirty.
If one row is inserted and a value is set in a cell, the row is considered an inserted row, not a dirty row. The cell is not considered a dirty cell.
An item will not be considered dirty when loading bound data, but it will become dirty after changing the value of bound data.
Items will keep their dirty status even after undo actions.
You can get all dirty rows by calling the
getDirtyRows method in the sheet. If there is existing bound data, users will get the row, item, and originalItem from dirty rows; otherwise, only the row with the value.
You can get all dirty cells by calling the
getDirtyCells method. Provide operational arguments in the following order if a specified range is given.
row: The row index of the top-left cell in the range.
col: The column index of the top-left cell in the range.
rowCount: Total row count of the range.
colCount: Total column count of the range.
Each dirty cell provides this information:
row, col, oldValue, newValue.
You can get all deleted rows by calling the
getDeletedRows method in the sheet. If there is existing bound data, users will get the row and originalItem from dirty rows; otherwise, only the row with the value.
You can get all inserted rows by calling the
getInsertRows method in the sheet. Each inserted row provides information about the row and item (data).
Dirty, inserted, and deleted status can be cleared by
clearPendingChanges. They will be automatically cleared after calling setRowCount, setColumnCount, fromJSON, or setDataSource.