How can I change the color of a table cell after an event?


I have a normal table and what I want to do is, that when a ValueChangeEvent is fired a certain Cell should get another color.
So my problem is how to get cells from a table to use “addStyleName(String style)”?

A CellStyleGenerator is not what I need because this works only at the initialization of the table. Am I right?

Thanks a lot for your help!


CellStyleGenerator works not only at the initialization. Use refreshRowCashe() method in your event handler to refresh table’s UI.
It should work.


Hi Alex,

thanks for your reply. If this works, how can I style a certain cell depending on a certain condition?

E.g.: There´s a column “A”, generated with a ColumnGenerator and contains TextFields. If the content of a TextField differentiates from the content of another column, “B”, column “C” should be red.
That´s my use case.

Thanks a lot!