Individual column search on ajax data ?

Individual column search on ajax data ?

aka_rajaka_raj Posts: 2Questions: 1Answers: 0

Is it possible to do? I have made a working table using sAjaxSource in the oTable = $('#refSrc').dataTable() args, and the example code (https://datatables.net/examples/api/multi_filter.html) does draw the individual column search boxes, but no query is sent to the db backend. It looks like the example is built using data already supplied to the table, but can it be adapted to work with ajax data? Apologies but my js knowledge is rudimentary.

Answers

  • aka_rajaka_raj Posts: 2Questions: 1Answers: 0

    Update: I've found that it does work if I disable serverSide so that all results are passed to the table. That setting disables limit/offset. Ideally I'd like serverSide AND column search. Is THAT possible?

  • glendersonglenderson Posts: 231Questions: 11Answers: 29

    When you do sererSide, it's your ajax page that needs to handle all the of the sorting and filtering and pagination methods. When in serverSide mode, dataTable is your display interface only. So you have to look at the passed parameters to your ajax page in either the GET or POST request variables and use them to craft your SQL.

This discussion has been closed.