Yes. You have to write your custom filtering function, see http://datatables.net/examples/plug-ins/range_filtering.html, and http://datatables.net/examples/api/multi_filter_select.html .
Basically the idea is that whenever you want to do a filter, DataTables doesn't care about the source, just call fnFilter() with whatever you want the filter to act on for your given column.
Thank you!
I figured DataTables does not care about the source, but I am not sure how to call it for one particular column. The examples for select multi column filtering was for all columns..Basically this is what I have for using text input.
I want to change the ticketType filter to a select filter. Do I just add that in html instead of in javascript?
> I want to change the ticketType filter to a select filter. Do I just add that in html instead of in javascript?
Yes - you can do it in either HTML or Javascript - it doesn't really matter which to DataTables. As long as you attach the required event handler (i.e. $().change() for select elements and $().keyup() for inputs) then you just need to call fnFilter with the selected / input value (and the column index).
Replies
Hth,
Gerardo
http://datatables.net/examples/api/multi_filter.html
http://datatables.net/examples/api/multi_filter_select.html
Basically the idea is that whenever you want to do a filter, DataTables doesn't care about the source, just call fnFilter() with whatever you want the filter to act on for your given column.
Allan
I figured DataTables does not care about the source, but I am not sure how to call it for one particular column. The examples for select multi column filtering was for all columns..Basically this is what I have for using text input.
I want to change the ticketType filter to a select filter. Do I just add that in html instead of in javascript?
An awesome product btw!
Thanks!
> I want to change the ticketType filter to a select filter. Do I just add that in html instead of in javascript?
Yes - you can do it in either HTML or Javascript - it doesn't really matter which to DataTables. As long as you attach the required event handler (i.e. $().change() for select elements and $().keyup() for inputs) then you just need to call fnFilter with the selected / input value (and the column index).
Allan
Thank you for the guidance!
That worked.
J O.