3.0.5

Row text color depending value of a cell

How can i apply format on a row depending of value in a cell on a specific column? (For example: on column 4 of grid i want text color red)

There is an example where only apply to the same cell but it's needed on entire row.

Can anyone help me?

DAS
May 17,
var rowBackgroundCallback = function(){
var rowIndex = this.getProperty("row/index");
var qty = obj.getDataProperty("text", rowIndex, 3);
if( qty > 0 ){
return "LightGreen";
}
var rowOrder = this.getProperty("row/order");
return rowOrder % 2 ? "#EEEEEE" : "#FFFFFF";
}

var row = new Active.Templates.Row;
row.setStyle("background", rowBackgroundCallback);

obj.setTemplate("row", row);
danik
February 21,
var rowBackgroundCallback = function(){
var rowIndex = this.getProperty("row/index");
var qty = obj.getDataProperty("text", rowIndex, 3); <--- not text but value, the rest is correct
if( qty > 0 ){
return "LightGreen";
}
var rowOrder = this.getProperty("row/order");
return rowOrder % 2 ? "#EEEEEE" : "#FFFFFF";
}

var row = new Active.Templates.Row;
row.setStyle("background", rowBackgroundCallback);

obj.setTemplate("row", row);
ez
March 3,

This topic is archived.

See also:


Back to support forum