Server side refresh without changing page in 1.10

Server side refresh without changing page in 1.10

YongerYonger Posts: 2Questions: 1Answers: 0

I have code working to do server side processing with datatables 1.10. I have a checkbox included on the table and a button external to the table to do some processing with AJAX based on what is checked on the table. After this processing has finished I need to refresh the table from the server side to show the updates. All this is working just fine.

On the complete of the AJAX call, I call oTable.fnFilter('...') and pass in the current filter and the table refreshes from the server side.

But, in testing I noticed that when I am not on the first page it refreshes the table back to page 1.

What do I need to call in 1.10 using server side processing to just refresh the current page with the current filter from the server side?

Answers

  • YongerYonger Posts: 2Questions: 1Answers: 0

    ok, never mind I found it. Had been trying to do table.ajax.reload(null, false); as shown on the page https://datatables.net/reference/api/ajax.reload() but looks like it needs to be table.api().ajax.reload(null, false);

    Once I made that change then I can refresh the table and stay on current page.

This discussion has been closed.