Using server side processing just for pagination while mantain filtering and order locally
Using server side processing just for pagination while mantain filtering and order locally
Hello everybody.
I'm using datatables to display the content of a database with more than 4 million rows. So of course I'm using serverSide
.
Some of the columns of my database are not indexed so I don't want my clients to be able to sort or filter them as it would consume too much of my server, in this case ordering
and searching
are set to false.
On the other hand I would like to let my clients to sort or search the paginated results. For example, when the datatable is initialized 10 records (or 100 deppending on length
) are retrived from the database and my client would be able to sort or filter just these records without evoking new ajax calls.
I know I can capture the ordering
but I can't figure out how can I cancel the ajax calling and them apply the ordering locally. Is there a way to do that?
This question has an accepted answers - jump to answer
Answers
With server side processing you can't use client side searching even for just the rows displayed.
You might be interested to read this thread with a similar discussion:
https://datatables.net/forums/discussion/43411/is-it-possible-to-invoke-client-sorting-and-filtering-when-using-pipelining-approach#latest
Kevin
Thanks! I tried really hard to find a similar post but couldn't!
I will try to use allan's approach with clientSide processing and
rows().add()