3.0.5

onmouseover highlighting does not work with alternating row colors

Hi there
I'd like to have onmouseover highlighting AND alternating row colors in my grid. Both working fine separately but they dont work together. If I add the alternating row colors feature, the highlighting wont work anymore.
The code:
// alternating background colors
var alternate = function(){
return this.getRowProperty("order") % 2 ? "#fcfaf6" : "#ffffff";
}

var row = new Active.Templates.Row;

row.setStyle("background", alternate);

row.setEvent("onmouseover", "mouseover(this, 'active-row-highlight')");
row.setEvent("onmouseout", "mouseout(this, 'active-row-highlight')");

obj.setTemplate("row", row);
Leves
August 19,
ehm
problem solved. was my fault: i only inserted this row:
.active-row-highlight {background-color: #E8EFF7}
instead of inserting both:
.active-row-highlight {background-color: #E8EFF7}
.active-row-highlight .active-row-cell {background-color: #E8EFF7;}
now it works fine.
...though i dont really undertand why the 2. row is neccessary
Leves
August 19,

This topic is archived.

See also:


Back to support forum