SMART datagrid v.1 > Classes > DataSet
Set the state of data row which is specified by parameter row as state.
If checkStates is true, you can set by this method by force though State of data row is automatically set during row appending, updating, deleting. If force is true, it will be set even if checkStates is false.
It the state is changed actually, GridDataSet.onStateChanged event or TreeDataSet.onStateChanged event will be fired.
$('#setUpdated').click(function () {
var row = grid.focusedRow();
row && ds.setRowState(row.dataIndex(), DataLudi.DataRowState.UPDATED);
});
var createdRows = ds.getStateRows(DataLudi.DataRowState.CREATED);
for (var i = 0; i < createdRows.length; i++) {
if (ds.hasData(createdRows[i]) {
ds.setRowState(createdRows[i], DataLudi.DataRowState.UPDATED, true);
}
}