Delete the selected rows from the DataTable.
This method (and its singular counterpart,
row().remove()) removes the selected rows from the DataTable completely, deleting the allocated memory for data and nodes from the browser.
Please be aware that this method removes the data from the table internally but that action won't be visually shown until the
draw() method is called to update the display. This method can called simply as a chained method of the
rows().remove() method's returned object - for example
table.rows().remove().draw();. This method is used to reduce the number of draws required if multiple rows are being deleted for optimisation.
Delete the selected rows.
DataTables API instance.
Delete all rows with the class
selected from the table:
var table = $('#example').DataTable(); var rows = table .rows( '.selected' ) .remove() .draw();
Remove all rows from a table (this is the same effect as using
var table = $('#example').DataTable(); var rows = table .rows() .remove() .draw();
The following options are directly related and may also be useful in your application development.