How to change table row color in vaadin

HI im works with vaadin, I have a table and im using the addItem method to add elements, what I want to do is at the moment of adding a new element, which I have to do in order to run some tests and set the color of the added row.

For example, the test result is 1, then the line color should be red, and if the result is 2 lines, the color should be green.

So any help how to do this?

+6
source share
1 answer

You can do this with CellStyleGenerator and apply it to all cells in one row. Read more about CellStyleGenerator here .

+7
source

Source: https://habr.com/ru/post/914012/


All Articles