3.2.0

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);
April 11,
You can do it similar to row highlighting:

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

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

Congratulations again on your great work.


M.
April 12,

This topic is archived.

See also:


Back to support forum