:: Forum >>
Change Row color based on data
Here the sample code of change row color based on data (col) :
function myColor()
{
var value = this.getDataProperty("text", col);
if(value == 0)
return 'black';
else if(value == 3)
return 'red';
}
obj.getTemplate('row').setStyle('color', myColor);
Hilman
Monday, January 14, 2008
Here other sample to change row background color based on data(col)
function myColor()
{
var value = this.getDataProperty("text", col);
if(value == 0)
return 'white';
else if(value == 3)
return 'yellow';
}
obj.getTemplate('row').setStyle('background', myColor);
Hilman
Monday, January 14, 2008
This topic is archived.
Back to support forum
Forum search