:: Forum >>
how to let "dynamic row color" and "mouseover" work together
hi there,
I use sample below codes to set a dynamic row color:
grid.defineRowProperty("background", function(row){
var value = this.getCellValue(3, row);
return value == 2006 ? "#ddd" : "#fff";
});
grid.getRowTemplate().setStyle("background", function(){
return this.getRowProperty("background");
});
and use style to set mouseover effect:
#myGrid .aw-mouseover-row {background: #ccc}
Every one works fine seperately. But mouseover doesn't work if I put these 2 effect togeter.
Any one can help ? thanks
Shawn.
Tuesday, March 25, 2008
That's correct. The alternate even/odd style and mouseover-row don't work well together either.
Have you considered setting the text colour rather than the background?
Anthony
Wednesday, March 26, 2008
Add !important to the style rule -
#myGrid .aw-mouseover-row {background: #ccc!important}
Alex (ActiveWidgets)
Wednesday, March 26, 2008
#myGrid .aw-mouseover-row {background: #ccc!important}
works!
Shawn.
Thursday, March 27, 2008
This topic is archived.
Back to support forum
Forum search