var colors = ["#eee", "#ddd", "#ccc"];
obj.defineDataProperty("color", function(i){return colors[i]});
var row = new Active.Templates.Row;
row.setStyle("background", function(){
return this.getRowProperty("color");
});
obj.setRowTemplate(row);
// set alternate higlighting
obj.alternateColors = ["#eee", "#ddd", "#ccc"];
obj.alternate = function(){ return obj.alternateColors[this.getProperty("row/order") % obj.alternateColors.length]; }
obj.getTemplate("row").setStyle("background", obj.alternate);
var colors = ["red", "blue", "green"];
obj.defineDataProperty("color", function(i){return colors[i%colors.length]});
var row = new Active.Templates.Row;
row.setStyle("background", function(){
return this.getItemProperty("color");
});
obj.setRowTemplate(row);
This topic is archived.