Filtering on Column With Checkbox
Filtering on Column With Checkbox
thecountofzero
Posts: 21Questions: 0Answers: 0
Allan,
I have been looking into doing this I have run into the exact problem you mention here.
After getting stuck I searched the forums and found this response from you on the topic.
"It's actually quite difficult to filter on a column with checkboxes in it. The reason for this is that you need to look at the live DOM, rather than the internally cached state in DataTables. It certainly is possible, using the custom filtering options that DataTables provides, but it's non-trivial to do (a reasonably good understanding of Javascript will be required).
There isn't an example of this available at the moment, but I'll add it to my to-do list (which is rather long now, so it won't be any time soon...).
Allan"
Any updates on methods for doing this cleanly?
Thanks,
Mike
I have been looking into doing this I have run into the exact problem you mention here.
After getting stuck I searched the forums and found this response from you on the topic.
"It's actually quite difficult to filter on a column with checkboxes in it. The reason for this is that you need to look at the live DOM, rather than the internally cached state in DataTables. It certainly is possible, using the custom filtering options that DataTables provides, but it's non-trivial to do (a reasonably good understanding of Javascript will be required).
There isn't an example of this available at the moment, but I'll add it to my to-do list (which is rather long now, so it won't be any time soon...).
Allan"
Any updates on methods for doing this cleanly?
Thanks,
Mike
This discussion has been closed.
Replies
I'm trying the approach of "update a hidden column when box gets checked" but... not having much luck there either.
I think my problem is that I can't figure out how to update the cached data based on state of the checkboxes and/or the content of the hidden column.
Any help would be greatly appreciated...
- Don
However, if anyone has done this and has any tips on problems you may have run into, that info would also be appreciated.
- Don
Could you post an example of your solution?