Recalculate footer info after row().remove
Recalculate footer info after row().remove
llameadrpc
Posts: 4Questions: 1Answers: 0
Using DT 1.10 API, how do I recalculate the footer info ('Showing 1 to 3 of 3 entries') after row().remove) A table.draw() just restores the removed rows.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Note: the number of rows as shown in the debugger is not decreasing with row().remove either.
Here is a test case that works, not sure what your issue is. If this doesn't help you will likely need to give us more info or a test case.
Note: The "remove" button at the bottom.
Link, please?
Wow, I'm really spaced out today :)
http://live.datatables.net/powakim/1/edit
Thanks.
@llameadrpc - sounds a lot like you are using server-side processing (but without either a test case, or a debug trace, as required in the forum rules) it is impossible to say.
If you are using server-side processing, then you need to delete the data at the data source (i.e. the server). Using a client-side method to remove the row isn't going to work.
Allan
Allan, I figured there was another issue going on because even with server-side the
draw()
wouldn't restore data that was deleted withrow().remove()
unless he is callingajax.reload()
somewhere?Allan is right, you really need to helps us help you on this one.
A simple
draw()
would "restore" the row. I quote "restore" because it was never removed from the data source. In server-side processing mode, DataTables is just a dumb display and event manager - deleting the data on the client-side makes no difference since the server doesn't know that this has happened.Allan