I would like to change the style of grid cell to indicate that it has been edited; I override getCellCSSText(), but for some reason the cell maintains the base style. The override function is as follows:
How can I achieve this?
Code:
public String getCellCSSText(ListGridRecord record, int rowNum, int colNum) {
String fieldName = getFieldName(colNum);
FieldType fieldType = ds.getField(fieldName).getType();
if(cellHasChanges(rowNum, colNum)){
return "color:green";
}else if(fieldType.equals(FieldType.FLOAT)){
if(record.getAttributeAsDouble(fieldName)<0.0d){
return "color:red";
}else{
return super.getCellCSSText(record, rowNum, colNum);
}
}else {
return super.getCellCSSText(record, rowNum, colNum);
}
}
Comment