Highlight based on user input

Highlight based on user input

JW8JW8 Posts: 2Questions: 0Answers: 0

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.



  • kthorngrenkthorngren Posts: 6,084Questions: 21Answers: 1,347

    I would look at using rowCallback to highlight the rows based on the checkbox. When the checkbox is toggled then simply call draw() to have the table redrawn thus running rowCallback.


  • JW8JW8 Posts: 2Questions: 0Answers: 0

    Ok great, thanks Kevin. This looks like I can use it to implement what I'm after. Appreciate the pointer.

Sign In or Register to comment.