Dynamically style individual cells - on event rendering
Dynamically style individual cells - on event rendering
This is not a problem as such, more of a question whether this is possible.
I have a datatable with a lot of numerical values.
I want to offer users the ability to select a column by clicking its header. This will set it as the "base".
For every row, it would then highlight cells below the value from the selected column in that row.
I can easily create the call back and can iterate through all the cells.
But I'm not sure how to apply the style, this is effectively rendering a cell in response to an event.
Applying a css dynamically to an individual cell won't work.
Thoughts are welcome.
Answers
Hi @amirir ,
This example here might help. It's highlighting different cells based on a
mouseenter
event, but you could easily change that to be aclick
event instead.Would that do the trick?
Cheers,
Colin