SMART datagrid v.1 > Classes > DataSet

Back  Forward

DataLudi.DataSet.clearRowStates  method

Initialize the state of data row which has the state specified by states array as DataRowState.NONE. If states is null, it will initialize all states. If rowEvents is true, it will be initialized in each individual row and fire onStateChanged event. If false, onStatesCleared event will be fired after initializing the state of all rows. 

function clearRowStates (states: [DataRowState], deleteRows: Boolean, rowEvents: Boolean);
Returns
Void
Parameters
states - [DataRowState]. required.
It specifies states to be initialized as array. If it is null, it will initialize all states.
deleteRows - Boolean. Defaults to false.
If specify as true, it will actually delete rows of deleted state(DataRowState.DELETED, DataRowState.CREATE_AND_DELETED).
rowEvents - Boolean. Defaults to false.
If specify as true, an event will be fired whenever change the state of individual row.
Code -1
    // Initialize all states and actually delete the rows of deleted state.
    ds.clearRowStates([], true);
See Also
GridDataSet.onStateChanged
TreeDataSet.onStateChanged
onStatesCleared
DataRowState