3.2.0

Row Color won't stay with the data after sort?

I need to show different Row color based on 1st column value.
...
function getColor(){
var i = this.getProperty("row/order");
var atype = obj.getDataText(i, 0);
var color;
if ( atype == "1") color = 'teal';
if ( atype == "2") color = 'olive';
if ( atype == "3") color = 'purple';
return color;
}
row.setStyle('color', getColor);
obj.setTemplate("row", row);
....
It works fine except after sorting... any idea? Help

B Y
October 20,
Never mind. change "row/order" to "row/index" will do.
Thanks
B Y
October 20,

This topic is archived.

See also:


Back to support forum