I know this question is popular, but all the answers are for selected rows. I am trying to delete / delete a row that is NOT selected. I have a variable for the table that I want to remove from the row, and I have the index of the row I want to delete.
These are various ways to get a table or row descriptor:
var table = $('#tableName');
var rows = $('#tableName tbody tr').toArray();
var oTable = $('#tableName').dataTable();
I know how to use the method row.remove()
on the selected line.
var jThisButton = $(this);
var jRow = jThisButton.parents("tr");
jRow.remove();
But my row is NOT selected ; I have an index instead. Say my index is 2. Using something like the above code, maybe I can get the row by index and delete it as follows:
var jRow = table.find('tr').eq(index);
jRow.remove();
, . , , , .

, 4 .
tr, 2?

. , !