Style DataTable cell based on cell contents?

I changed from an html.Table to DataTable so I could trigger a callback on cell selection. With the html table I had a function that returns a list of classes given the value in a cell, and css styling for those classes. I want the same effect in the DataTable implementation.

Is there a way to call a function (i.e., some adaptation of my function that returns a list of classes) on the contents of the cell, and use that to do the styling? I’ve been going over the examples, but trying to infer the filter_query syntax from examples is driving me up a wall. Is there documentation for it, beyond the page of examples? I looked but didn’t find anything.

I wish I could just put a html.Div or other object in a DataTable cell. That would solve this and other difficulties very simply.

EDIT: Alternately, a way to use an html.Table (or dbc.Table) and trigger a callback when a cell is selected would make this easy. I just need the callback function to get the row id and column id of the selected cell.