SMART datagrid v.1 > Classes > GridDataSet

Back  Forward

DataLudi.GridDataSet.deleteRow  method

Delete data row of the location specified by row. If the data row is deleted actually, onRowDeleted, DataSet.onDataChanged, onRowCountChanged events will be fired in order. If softDeleting is true, it will run as Table-1 below. 

function deleteRow (row: Integer);
Returns
Void
Parameters
row - Integer. required.
Table-1  Execution result when it is DataSet.softDeleting
Current StateExecution result
CREATEDIf deleteCreated value of data set is true, it will delete actually, else will change the state as CREATE_AND_DELETED.
DELETED, CREATE_AND_DELETEDDo nothing.
NONEChange the state as DELETED.
Code -1
    var row = grid.focusedRow();
    if (row && row.dataIndex() >= 0) {
        ds.deleteRow(row.dataIndex());
    }
See Also
onRowDeleted
deleteRows
DataSet.onDataChanged
onRowCountChanged
Examples
Grid Data Set Edit
Row Deleting