3.0.0

how to let "dynamic row color" and "mouseover" work together

hi there,

I use sample below codes to set a dynamic row color:

// add custom row property calculated from the cell value in col-3
    grid.defineRowProperty("background", function(row){
        var value = this.getCellValue(3, row);
        return value == 2006 ? "#ddd" : "#fff";
    });

    // add dynamic row style linked to the custom row background property
    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.
March 25,
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
March 26,
Add !important to the style rule -

#myGrid .aw-mouseover-row {background: #ccc!important}
Alex (ActiveWidgets)
March 26,
#myGrid .aw-mouseover-row {background: #ccc!important}

works!
Shawn.
March 27,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.