SMART datagrid v.1 > Classes > TreeDataSet

Back  Forward

DataLudi.TreeDataSet.deleteRow  method

It deletes Data Row which has been specified by parameter row

row can specify TreeDataRow object or rowId. If softDelete and checkStates are both true, it will be deleted only when the row state is CREATED and deleteCreated is true, else will not be deleted actually and will only change the state as DELETED. If the state has already been DELETED or CREATE_AND_DELETED, it will not be changed either. 

Just before deleting, onRowDeleting event will be fired, and after deleting, onRowDeleted, DataSet.onRowCountChanged events will be fired in order. 

If row is not TreeDataRow contained in this data set, it will do nothing. 

function deleteRow (row: TreeDataRow|Integer);
Returns
Void
Parameters
row - TreeDataRow|Integer. required.
Code -1
    $('#remove').click(function ()) {
        var row = grid.focusedRow();
        row && ds.deleteRow(row.dataRow());
    }
See Also
DataSet.softDelete
DataSet.checkStates
onRowDeleting
onRowDeleted
onRowCountChanged
rowCount
TreeDataRow
Tree Overview
Examples
Tree Data Set
Hello Tree