how to multiple use datatables server side and client side
how to multiple use datatables server side and client side
Hi Allan
For now , we use the normal server side request in datatables: In frontend datatables , I use the server side model , the records showing in datatables is 5 records in every page, and when user want to go to the second page , I will post a request to server side for another 5 records. It is working perfectly .
But server team has a request if we can achieve this goal: In frontend datatables, I request for 1000 records for a ajax request.
In the first page and I will show the first 5 records of 1000 records for this page, for the second page, I will show another 5 records of 1000 records for this page . Obviously , the second 5 records will do not request for new ajax request and it just use the first 1000 records and it is just like client side model.
And when user go to the 201 pages, the datatables will post a new ajax request for another 1000 records. Obviously , this is a server side model . When user go to the 202 pages, the datatables will use the second 1000 records to show and it will not post for a ajax request also .
For above request , it will use multiple server side and client side model of datatables. And I search for this solution, but seems there is no more information about this . Do you have any idea for this solution? Can I use the recordsFiltered attribute to this request ? or is there any good solution ?
If you have any idea for this request, pls let me know. Thank you for your patient.
Best Regards
George Yuan
Answers
https://datatables.net/examples/server_side/pipeline.html
Above link is a good solution for what I asked . I will try it .