Deleting a row using .row().delete()
Deleting a row using .row().delete()
Link to test case: http://live.datatables.net/mapepodu/1/edit
Debugger code (debug.datatables.net): (see test case)
Error messages shown: TypeError: table.row(...).delete is not a function
Description of problem: I am using the first example of .row().delete() (see here) to delete a row by clicking on it and can't get it to work:
var myTable = $('#myTable').DataTable();
$('#myTable').on( 'click', 'tbody tr', function () {
myTable.row( this ).delete();
} );
When I click a row I am getting:
"TypeError: table.row(...).delete is not a function
myTable.row( this ).remove().draw( false );
is working as expected.
Any help is appreciated.
This question has an accepted answers - jump to answer
Answers
Hi @timavo,
As noted at the top of that page,
row().delete()
requires the Editor extension. Otherwise you will need to userow().remove()
.Hope this helps,
Sandy
Oh, well.... I didn't see that! Thanks @sandy!