problem with draw
problem with draw
pmengo
Posts: 74Questions: 37Answers: 2
Cannot redefine record count on window[o].tbl.clear().draw();
If table have 3 records and i clear table with tbl.clear().draw() , number of records in datatables info dont reflect the correct number of records. It keeps the same info and should be 0.
I use server side processing.
Thanks
This discussion has been closed.
Answers
Thanks for your question - however, per the forum rules can you link to a test case showing the issue please. This will allow the issue to be debugged.
Information on how to create a test page, if you can't provide a link to your own page can be found here.
Thanks,
Allan
http://www.quad-systems.pt/QUAD_PRS/#ajax/prs_articles.php
Please clik a row A in first table to see the other tables filled. Click again to deselect the row and you will see empty table but with wrong info.
Processing is in server side mode...
However in your code:
As the
clear()
documentation states:You cannot use that method with
serverSide
. However, server-side processing is only useful for tables with tens of thousands of records. Are you really going to have that many for those two tables?Allan
Yes ... i just want to redraw the table with no data, kind of reset it...
The problem is that search() dont work either
search()
will make an Ajax request to the server if server-side processing is enabled. If that isn't working, you need to check your server-side processing implementation.To clear the table with server-side processing you would need to clear the server-side data source. You could possibly just use jQuery to remove the rows on the client-side, but any action that would redraw the table would cause them to be put back (since they are still present on the server-side).
Allan