Dynamically style individual cells - on event rendering
Dynamically style individual cells - on event rendering
![amirir](https://secure.gravatar.com/avatar/d4daed05200a11463e0ca5c5a3f0c0aa/?default=https%3A%2F%2Fvanillicon.com%2Fd4daed05200a11463e0ca5c5a3f0c0aa_200.png&rating=g&size=120)
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