:: Forum >>

Row & Cell highlighting

Hi,

Firstly, I'll add my congratulations on a fantastic bit of JavaScript.

I am currently highlighting the row selected on mouseover in a different colour, using the code below. This works fine, but in addition to this I would like to change the colour of the particular cell the mouse pointer is over in a different colour again - i.e. continue highlighting the entire row in orange, but change the actual cell over which the mouse pointer is to a darker shade of orange.

Any idea how I might do this?

Thanks for your help.


M.


<style type="text/css">
.active-row-highlight .active-row-cell {
background-color: #FF9A00;
cursor:'pointer';
}

</style>

...

// Set row styles:
var alternateRowColour = function() {
return this.getProperty("row/order") % 2 ? "threedface" : "white";
}
var row = new Active.Templates.Row;
row.setStyle("background", alternateRowColour);
row.setEvent("onmouseover", "mouseover(this, 'active-row-highlight')");
row.setEvent("onmouseout", "mouseout(this, 'active-row-highlight')");
grid.setTemplate("row", row);
Monday, April 11, 2005
You can do it similar to row highlighting:

http://www.activewidgets.com/grid.howto.style.columns/mouseover.html
Alex (ActiveWidgets)
Monday, April 11, 2005
Thanks Alex,

Works a treat! Should've guessed it would be that easy.

Congratulations again on your great work.


M.
Tuesday, April 12, 2005

This topic is archived.


Back to support forum

Forum search