Deleting rows that are not on page
Deleting rows that are not on page
I am attempting to remove a row using the fnGetPosition and fnDeleteRow. I am using the pagination feature. The row I wish to delete is not currently being display as it is on another page. e.g. I am showing 1-10 entries, where I want to delete the 23rd entry.
fnGetPosition fails (as you would expect). However, I need a way to remove the entry from the underlying data. Is this possible?
fnGetPosition fails (as you would expect). However, I need a way to remove the entry from the underlying data. Is this possible?
This discussion has been closed.
Replies
[code]
var row = table.$('#myRowId')[0];
table.fnDeleteRow( row );
[/code]
?
DataTables 1.10 will be able to do:
[code]
table.row( '#myRowId' ).remove().draw();
[/code]
Allan
I need to delete the row, such that if the user uses the pagination options, then the 23rd entry has been deleted. Essentially I want to update the underlying data structures and ensure the total count has been decremented on the UI.
Allan