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.

Thanks,
Jordan

Replies

  • kthorngrenkthorngren Posts: 20,144Questions: 26Answers: 4,736

    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.

    Kevin

  • 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.

This discussion has been closed.