A checkbox tablecell must change rowStyle

Hi everyone,

I have an editable table with one column with checkbox. I’m using a CellStyleGenerator over the table and a TableFieldFactory to create a editable Field for each column and get the correct style (row and column). When I add the lines the CellStyleGenerator returns the correct stylename, but when I change the value of the checkbox, the checkbox fires a valueChange event but I don’t know how to change the row style or force a “restyling” for the row.
My idea is to get a red row when checkbox is unchecked and green if it’s checked, in an editable checkbox.

Any idea?

Thanks in advance,

Oriol

Ok, I found a way but it’s not immediately. If I put the refreshRowCache on valueChange event, I get an error (I think it’s called recursively), refreshRowCache =>valueChange=>refreshRowCache. Then I need to put on Blur event. Any idea to get immediately?


checkbox.addBlurListener(new BlurListener() {
				
@Override
public void blur(BlurEvent event) {
   table.refreshRowCache();					
}
});