Highlight based on user input
Highlight based on user input
Hi all, I’m new to using datatables and had a question that I’ve tried searching for, with no luck.
I have a checkbox that, when selected, hides rows - effectively acting as a filter.
Is there a built-in way to highlight the rows returned in a different colour rather than hide them?
Apologies if this is fairly straight forward however I’ve scoured the manual, and tried searching, with no luck.
I’ve not included any code as this is more of a request for direction than to solve a specific technical issue. I can post if it makes sense.
Thanks,
Jordan
Replies
I would look at using
rowCallback
to highlight the rows based on the checkbox. When the checkbox is toggled then simply calldraw()
to have the table redrawn thus runningrowCallback
.Kevin
Ok great, thanks Kevin. This looks like I can use it to implement what I'm after. Appreciate the pointer.