Matthew131
(Matthew Dornfeld)
1
I came across this thread on styling vaadin grid: https://github.com/vaadin/vaadin-grid/issues/922
Is there a way to extend this method to colorize row text based on a column value?
For example, if col3.value > 10 then row color is green.
Or if col3.value > 10 then cell color is green.
Adrian152
(Adrian Diaz)
2
you need to set a style to the row using .setStyleGenerator()
just like this
this.setStyleGenerator(prop -> {
// Style based on object value
String style=prop.getvalue()>10 ? "green" : "red";
return style;
});****
and them create a style in yous css page
.v-grid-row.green>td {
background-color: green;
}