multi selection filter using dropdown list in header of each column
multi selection filter using dropdown list in header of each column
prats
Posts: 45Questions: 21Answers: 0
Hi I tried this feature:
datatables.net/release-datatables/examples/api/multi_filter_select.html
But this is for single value selection from each column. I want to implement multi value selection column filter, so when we select multi values from same column filter dropdown, will get data related to selected values from dropdown list.
My jsFiddle is:https://jsfiddle.net/prats1251/vf3c3sn4/
Thanks.
This question has accepted answers - jump to:
This discussion has been closed.
Answers
Here are a couple of options. You can use regex. I added an example (based on this example) to your fiddle:
https://jsfiddle.net/vf3c3sn4/1/
You can type something like this into the Global Search box:
as|br|ca
You can create a custom search plugin:
https://datatables.net/manual/plug-ins/search
Or you can try YADCF:
http://yadcf-showcase.appspot.com/cumulative_filtering.html#
@kthorngren I have added yadcf 0.9.1 plugin.Its good plugin but not properly working for ajax data as getting error
Uncaught TypeError: Cannot read property 'mData' of undefined at jquery.dataTables.yadcf.min.js
might be I have not initialised data properly with yadcf
@prats I created a simple yadcf with select2 example using ajax data. Its using the datatables ajax example data provided by Allan.
Maybe you can try your code with my example or post it for review.
Kevin
Thanks @kthorngren.