:: Forum >>

Set each row color individually

I've read thought much of the docs/forum and even tried to use the alternating row color example but I can find an easy way to color each row individually. I have resorted to using <DIV>s around the data in each cell. this was a quick fix but it is becoming a pain to work with/around.

Can anyone point me to a better solution?

Thanks,
Mark
markl
Wednesday, April 28, 2004
Hey, that would be a nice option.

Wayne
WayneL
Wednesday, April 28, 2004
var colors = ["red", "blue", "green"];

obj.defineDataProperty("color", function(i){return colors[i]});

var row = new Active.Templates.Row;
row.setStyle("background", function(){
return this.getItemProperty("color");
});
obj.setRowTemplate(row);
Alex (ActiveWidgets)
Wednesday, April 28, 2004
Thanks! This is exactly what i was looking for! I guess i should have asked for help sooner :). Thanks a million.

Mark
markl
Thursday, April 29, 2004
I must be an idiot, i know i made this work, but this time i cant see it. i have tried it several different ways. i do not receive any errors, but nothing loads. what am i missing to make this work. anyone please? thanks
Larry
Wednesday, August 4, 2004
I don't know how to write in ASP? Help Me!
star
Tuesday, June 7, 2005

This topic is archived.


Back to support forum

Forum search