SMART datagrid v.1 > Classes > DataSet

Back  Forward

DataLudi.DataSet.restoreUpdatedRows  method

Among the rows which are transferred by parameter rows, it will restore the value of UPDATED rows as the value before change, and also reset the state as NONE

If rows is not specified, it will check all rows. 

If restoreMode is AUTO or EXPLICIT, it will store the existing values when change the row of NONE state. Later, if call this method, it will remove the stored values after restoring field values and returning the state as NONE

In addition, when restoreMode is AUTO, it will compare with the stored values whenever the row is changed, and return the state as NONE and remove the stored values if they are the same. 

function restoreUpdatedRows (rows: [Integer]|Integer);
Returns
Void
Parameters
rows - [Integer]|Integer.
You can specify one row number list, row number array or row number value which will be restored.
Code -1
    $('#restore').click(function () {
        // Restore from the selected rows.
        dataset.restoreUpdateRows(grid.getSelectedDataIndices());
        // Restore from all rows.
        dataset.restoreUpdateRows();
        // Restore one row.
        dataset.restoreUpdatedRows(10);
    }
See Also
restoreUpdatedStates
restoreMode
strictRestore
DataRestoreMode
Examples
Restore Data Rows