Cannot access by id rows that are not in the DOM
Cannot access by id rows that are not in the DOM
Hi,
When I add rows, I attach to them an id, e.g.: row_id_xxx .
When I delete a row, I use fnDeleteRow($("#" + row_id_xxx)[0]).
This works fine as long as the row is visible in the page.
I found out that datatables removes from the DOM rows that are not visible due to pagination.
If jquery cannot find the row by id, how am I supposed to delete the row?
Of course I can go over _aoData and search the row I want to delete (one of the columns is also the id), but it will not be efficient.
TIA,
Dror
When I add rows, I attach to them an id, e.g.: row_id_xxx .
When I delete a row, I use fnDeleteRow($("#" + row_id_xxx)[0]).
This works fine as long as the row is visible in the page.
I found out that datatables removes from the DOM rows that are not visible due to pagination.
If jquery cannot find the row by id, how am I supposed to delete the row?
Of course I can go over _aoData and search the row I want to delete (one of the columns is also the id), but it will not be efficient.
TIA,
Dror
This discussion has been closed.
Replies
Allan