Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 1816

FnDeleteRow() using <TR> ID

$
0
0
This forum is AWESOME and I learn so much about DataTables reading through it.

I am using Datatables Version: 1.9.3 and trying to get the fnDeleteRow logic to work appropriately to delete a row by a table's row "id" attribute.

The line that I have been using that works appropriatey SOME of the time is as follows.
oDataTable.fnDeleteRow($('#' + sTestTrackIDs)[0]);
where sTestTrackIDs is the table's row (<tr>) ID.

This will work most of the time but I receive the error stating "'nTR' is null or not an object" once I believe to delete the first row of the table.

I have a good idea that the error is caused from deleteing the first row of the table and then the index internally to datatables is being corrupted.
There shouldn't be over a 100 rows on the table so I would be happy to loop through the table to search for the ID and then delete it appropriately but am struggling with how to do that.

Thanks in advance for any help on this!!!

--Gary

Viewing all articles
Browse latest Browse all 1816

Trending Articles