Multiple dropdown filters (update filters choices based on other filters already selected)
Multiple dropdown filters (update filters choices based on other filters already selected)
Hello Everybody,
I am considering to use the "individual column filtering example (using select menus)" from:
http://datatables.net/release-datatables/examples/api/multi_filter_select.html
However, I am seeking a solution for what Allan wrote in the preamble:
"One possible interaction chance would be to make use of fnGetColumnData's ability to get filtered data, so you could have the possible filtering values in the select menus to update to only those in the table, rather than all values."
Basically, if you look at that page, you would see that when you select "Gecko" from under the 1st column, while the table limits to the rows that contain "Gecko" inside that column, the other dropdowns for filtering aren't populated with the available choices that correspond to the "Gecko" rows.
In other words, say on the dropdown filters from under the 2nd column we get all the possible filters from the whole table, not only the ones that are available inside the rows that contain also the "Gecko" value, already selected under the 1st column.
Is any of you having that solution at hand?
What should I add to that coding so that the dropdown filters choices update based on any other filters already selected?
Thanks,
Mihai
I am considering to use the "individual column filtering example (using select menus)" from:
http://datatables.net/release-datatables/examples/api/multi_filter_select.html
However, I am seeking a solution for what Allan wrote in the preamble:
"One possible interaction chance would be to make use of fnGetColumnData's ability to get filtered data, so you could have the possible filtering values in the select menus to update to only those in the table, rather than all values."
Basically, if you look at that page, you would see that when you select "Gecko" from under the 1st column, while the table limits to the rows that contain "Gecko" inside that column, the other dropdowns for filtering aren't populated with the available choices that correspond to the "Gecko" rows.
In other words, say on the dropdown filters from under the 2nd column we get all the possible filters from the whole table, not only the ones that are available inside the rows that contain also the "Gecko" value, already selected under the 1st column.
Is any of you having that solution at hand?
What should I add to that coding so that the dropdown filters choices update based on any other filters already selected?
Thanks,
Mihai
This discussion has been closed.