How do you create a filter for multiple exact match strings?
How do you create a filter for multiple exact match strings?
Basically I have a table with my data and a separate multi-select list box with all of the possible values for one of the columns. I would like to be able to filter the table to rows where column x = one of the values selected in my list box. I do not have any code at this point because I am very new to data table and do not know if this is even possible. So far from my reading it seems like you can match by regular expression or by range. Any help would be greatly appreciated.
This question has an accepted answers - jump to answer
Answers
You might find my yadcf plugin for datatables useful for you , I got several range filters and filter_match_mode which can be set to contains / exact / startsWith
go over the showcase pages and docs (in js file)
http://yadcf-showcase.appspot.com/DOM_source.html
https://github.com/vedmack/yadcf/blob/master/jquery.dataTables.yadcf.js
Does this have an "in" filter? For example "filter values column where value in ('a_value', 'b_value')".
It looks like it has a "multiselect" ability but I am not sure how to call it.
I suggest you go over the entire showcase and inspect the various filters and options. Pay attention to the cose snippets for each example and you can also read the detailed docs in yadcf js file. Im sure you will find all you were looking for and much more. Note that in order to use yadcf integration with other third-party pligins such as chosen/select 2 you need to include them on your html too... http://yadcf-showcase.appspot.com
Looks like exactly what I was looking for. Thank you very much!