Yes you are correct it helped me lot, Thank you so much.
I used like bellow

info.forEachChangedField(function(fieldName,val) {
var lastPrice = info.getChangedFieldValue(fieldName);
if (lastPrice !== null) {
var prevPrice = grid.getValue(key,fieldName);
if (!prevPrice || lastPrice > prevPrice) {
info.setAttribute(greenColor,cold,"backgroundColor ");
} else {
info.setAttribute(redColor,cold,"backgroundColor") ;
}
} else {
info.setAttribute("#000000",cold,"backgroundColor" );
}
formatDecimalField(info, fieldName);
});
It's working well.