Multi Select Filter/Search issue. Is this possible with Datatables?
Multi Select Filter/Search issue. Is this possible with Datatables?
Here is a link to a test table I had put together.
http://live.datatables.net/masakez/2/edit
As you can see I had put two selects at the top with different values from the table to act as a simple combo of filters. It works nicely, and I thought I was done but then realized there is some major functionality missing.
Say the user selects 'option2' in select 1, and 'active' in select 2, datatables then searches for the string 'option2 active' in the datatable and draws it. That's all when and good, but the problem is I need to search for all records with 'option2' in them, AND THEN from those records, which of those has 'active' in the column ADJACENT/NEXT to the column with in which 'option2' was found, for each row.
Does Databases have the functionality to do this? Any advice?
I'm guessing I have to search for 'option2' and then somehow get a column reference for that positive search result in each row, and then search in the next column over of that row.....don't know how though!
Any advice or pointers appreciated!
This question has an accepted answers - jump to answer
Answers
There are two options here:
Allan
Allan=Legend
if anyone is interested here is a working example of this in action:
http://live.datatables.net/masakez/5/edit
It's not the most elegant js, as I'm sure a loop would do nicely in this situation, but I'm rubbish at js so can't don't want to spend the time making it more efficient