Search in multiple columns with the searchbox

Search in multiple columns with the searchbox

SchmakusSchmakus Posts: 15Questions: 10Answers: 0

Hi,

I use Datatables 1.10.6 and server-side-processing.
If I want to search in multiple columns with spaces, e.g. SearchColumn1 SearchColumn2, it doesn't work.
How can i fix this?

Thanks, Schmakus

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,734Questions: 1Answers: 10,111 Site admin

    With server-side processing you need to break the string apart and then perform something analogous to DataTables' client-side smart filtering. The demo server-side scripts don't do that as it can be a real performance hit on the SQL server.

    Allan

  • SchmakusSchmakus Posts: 15Questions: 10Answers: 0

    Hi Allan,

    could you give me an example? I do not understand you correctly.

    Schmakus

  • allanallan Posts: 61,734Questions: 1Answers: 10,111 Site admin
    Answer ✓

    Have a look at the example code here and more generally have a read through that whole thread as it discusses what is required and what the presented solution is.

    Allan

  • SchmakusSchmakus Posts: 15Questions: 10Answers: 0

    Thank you Allan!
    I changed to "Client-Side". I think, it's easier for me.

This discussion has been closed.