3.0.5

Font Color (Cell)

Hi,

First, thanks Alex for this great works you do.

My question is, how can'i execute my myColor function to test column 6 in your example and change the color of the cell in a nother column 2?

Thanks a lot for your help :)
Latif
March 12,
Similar to /examples/grid/cell colors.htm (set color in 2nd column based on value of the 5th column)

function myColor(){
var value = this.getDataProperty("value", 4);
return value > 10000 ? "red" : "blue";
}

obj.getTemplate("column", 1).setStyle("color", myColor);
Alex (ActiveWidgets)
March 13,
Im trying this:

var obj = new Active.Controls.Grid;

function myColor(){
var value = this.getDataProperty("value",4);
if (value == "Solicitado") return "blue";
else if (value == "Aprobado") return "green";
else if (value == "Rechazado") return "red";
else return "yellow";
}

obj.getTemplate("column", 4).setStyle("color", myColor);

obj.setModel("row", new Active.Rows.Page);

But nothing happens...
Daniel - Venezuela
July 7,

This topic is archived.

See also:


Back to support forum