SMART datagrid v.1 > Classes > TreeDataSet
It deletes one or more Data Rows which have been specified by parameter rows.
Each item of rows 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 of rows has already been DELETED or CREATE_AND_DELETED, it will not be changed either.
Just before deleting, onRowsDeleting event will be fired, and after deleting, onRowsDeleted, onRowCountChanged events will be fired in order.
If no row will be deleted actually in rows, it will do nothing.
$('#remove').click(function ()) {
var rows = grid.getSelectedRows();
if (rows && rows.length > 0) {
var list = [];
for (var i = 0; i < rows.length; i++) {
list.push(rows[i].dataRow());
}
dataset.deleteRows(list);
}
}