Since: DataTables 1.10

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.


function rows().remove()


Delete the selected rows.


DataTables API instance with references for the removed rows in the result set


Delete all rows with the class selected from the table:

var table = new DataTable('#myTable');

var rows = table

Remove all rows from a table (this is the same effect as using clear():

var table = new DataTable('#myTable');

var rows = table


The following options are directly related and may also be useful in your application development.