i have a celltable in GWT, I can change color of a specific column by this
celltable.addColumnStyleName(4, "bluetext");
but how can i change for example color of row No 3
Thanks
i have a celltable in GWT, I can change color of a specific column by this
celltable.addColumnStyleName(4, "bluetext");
but how can i change for example color of row No 3
Thanks
If you need to update row color based on a value changed in one of the cells, you can add the following code to the fieldUpdater of this cell:
In your CSS file add this style:
You have to provide a
RowStyles
object that returns css class names for each row. So, to set a particular color for a row, you'd have to define a css class with that color, and then cause yourRowStyles
object to return that class for the relevant rows.I think you set this with
cellTable.setRowStyles
or something similar.To answer the last comment that the style is in the row element but is not being rendered: Using setRowStyles(new RowStyles() ... The only way I got the styles to appear was to use brute force. I had to remove the row from my List store, add it back to the same index and then refresh the RowModel. For what it's worth.