3.2.0

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
January 14,
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
January 14,

This topic is archived.

See also:


Back to support forum