Filter with one select on a combination of columns?
Filter with one select on a combination of columns?
I'm wondering, if the following could be achieved:
From a database I get 4 fields per dataset (a row in a dataTable), containing either a 0 (Zero) or a 1 (One). The information of all 4 make up the information of another column in the same dataset (row). The user can use a select in this additional column to filter by the content of the other columns.
I put up an example here: http://live.datatables.net/lipuyef/1/edit?html,output
The 4 columns Training_n_passed contain the binary information, the column Training_status contains the collected information of the 4 columns. Filling Training_status with readable information could be made during filing the table from the database or with fnRowCallback.
Since the binary information is not so easy to grasp, I would like to present the information in a better understandable form. I would like to hide the columns with the binary information (Training_n_passed) and offer another column to filter upon. So if the user changes the select under Training_status, he should be able to select each value separately and not the combination of them found in the innerHTML of the cell. Setting the select to Training_2 would select all rows with people that passed Training_2.
Any help appreciated,
Hans
From a database I get 4 fields per dataset (a row in a dataTable), containing either a 0 (Zero) or a 1 (One). The information of all 4 make up the information of another column in the same dataset (row). The user can use a select in this additional column to filter by the content of the other columns.
I put up an example here: http://live.datatables.net/lipuyef/1/edit?html,output
The 4 columns Training_n_passed contain the binary information, the column Training_status contains the collected information of the 4 columns. Filling Training_status with readable information could be made during filing the table from the database or with fnRowCallback.
Since the binary information is not so easy to grasp, I would like to present the information in a better understandable form. I would like to hide the columns with the binary information (Training_n_passed) and offer another column to filter upon. So if the user changes the select under Training_status, he should be able to select each value separately and not the combination of them found in the innerHTML of the cell. Setting the select to Training_2 would select all rows with people that passed Training_2.
Any help appreciated,
Hans
This discussion has been closed.