perform client-side searching when serverSide is set to true

perform client-side searching when serverSide is set to true

tushar87tushar87 Posts: 2Questions: 2Answers: 0

Hi the question was part on some discussion opened by babablacksheep on August 2014

Hi,
I see that if I set serverSide:true and if I use following code to search , it sends data to server.
I knwo this is desirable but in my case I have serverSide:true but I also want to be able to search inside table through another input .

So I have one input with server side search and one input to search whatever data is loaded at the moment.
Please help !!!

$('#example').DataTable().search("string").draw();

"It is not possible to combine both server-side and client-side processing in DataTables. They are mutually exclusive. The reason for this is that the search would only be able to search the data that has already been loaded at the client-side. That might be what is wanted in some limited cases, but it isn't a scenario that DataTables currently supports.

Allan"

Hi Allan,

Since the data is already on the client side and the table has been drawn couldn't we have a way to enable the search api only for the client side after the table is ready. ???

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,464Questions: 1Answers: 10,466 Site admin
    Answer ✓

    No sorry. DataTables does not support client-side search with server-side processing enabled. The search operation causes a redraw, which when server-side processing is enabled, means a request to the server-side. There is no way around that I'm afraid.

    Allan

This discussion has been closed.