3.2.0

How to change the background color in only one row

I need change the background color in only one row. For example, how to change the color of a row 8 in a table?

This line change a column 1 to "#e9f1f5" color:
obj.getTemplate("row/item", 1).setStyle("background", "#e9f1f5");

I need the same for one row.
Nacho
July 5,
I had the same problem but I found this worked for me:

var obj=new Active.Controls.Grid;
...
obj.defineDataProperty("color",function(i){if(i==8)return "#e9f1f5";else return "white"});
var row=new Active.Templates.Row;
row.setStyle("background",function(){return this.getItemProperty("color")});
obj.setRowTemplate(row);
...
document.write(obj);
S
July 7,
Thank you very much, S
Nacho
July 7,

This topic is archived.

See also:


Back to support forum