:: Forum >>

Font Color (Cell)


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 :)
Friday, March 12, 2004
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)
Saturday, March 13, 2004
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
Thursday, July 7, 2005

This topic is archived.

Back to support forum

Forum search