:: Forum >> Version 1 >>

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
Thursday, October 20, 2005
Never mind. change "row/order" to "row/index" will do.
Thanks
B Y
Thursday, October 20, 2005



This topic is archived.

Back to support forum

Forum search