:: Forum >> Version 1 >>
Change Row color based on data
More information on this topic is available in the documentation section:
/active.howto.style.rows/alternate-background-colors.html.
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 /active.howto.style.rows/alternate-background-colors.html
Documentation:
Forum search