Since: Editor 1.5.0

Delete an existing row.
Please note - this property requires the Editor extension for DataTables.


This method can be used to delete an existing record using the Editor main form. It is essentially a proxy for the remove() method, exposed through the DataTables API object with the row() selector being used to select the row to be removed.

The Editor instance used by this method is the last Editor instance create that refers to this table when the table was constructed. This consideration is only important when using multiple Editor instances!

Please note that this method only exposes one small part of Editor through the DataTables API. Editor has its own extensive API which provides complete control over the form.


function row().delete( options )


Delete a DataTable row using the main Editor form.


The original API instance, unmodified, is returned to allow chaining.


Delete the row clicked upon:

var myTable = $('#myTable').DataTable();

$('#myTable').on( 'click', 'tbody tr', function () {
    myTable.row( this ).delete();
} );

Delete the first row in the table - explicitly setting the form title:

var myTable = $('#myTable').DataTable();

myTable.row( ':eq(0)' ).delete( {
    title: 'Delete first row'
} );

Display the delete form with a cancel button:

var myTable = $('#myTable').DataTable();

$('#myTable').on( 'click', 'tbody tr', function () {
    myTable.row( this ).delete( {
        buttons: [
            { label: 'Cancel', fn: function () { this.close(); } },
    } );
} );


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