Add filter to server side Datatable
Add filter to server side Datatable
zwokaros
Posts: 1Questions: 1Answers: 0
Hello
I have a wonderful datatable
I would like to add more searching parameters (the same as the search text area or the row limit display)
For example a select, that will send a new field in the ajax request for "category" or a checkbox to only display the items added yesterday in my database
I haven't found a solution so far to add filters to my server sided datatable
Have a good day
This discussion has been closed.
Answers
I'm interested in this question too. I'll solve adding new filters in the near future.
Hi,
Here is how i did my DataTable to add filters.
In dataSrc it's json because in my case, my .php file return json encoded data.
Retrieve the filters value in your server side and do what you want with it.
Thank you for your code, RedPanda. Did you use server_processing.php script by DataTables or you've created your own? In my case I'm using server_processing.php from this web site and it is returning JSON data.
Which type of filtering did you use? I need date picker and checkboxes. Could you please share also the rest of your code to see how it's working?