3.2.0

Mouseover highlighting first column

I've implemented mouseover highlighting in my grid. The first column of the grid I'm using as a frzen field but it doesnt highlight onmouseover.
It only highlights the grid rows but not the first column
Is it possible to do this easily???
It would be a great help to me
Thanks
Brian.
September 30,
This code should do it:

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

var item = obj.getLeftTemplate().getItemTemplate();
item.setEvent("onmouseover", "mouseover(this, 'active-row-highlight')");
item.setEvent("onmouseout", "mouseout(this, 'active-row-highlight')");

var mouseover = function(element, name){
    try {
        element.className += " " + name;
        if (element.id.match(".data.")) {
            var element2 = document.getElementById(element.id.replace(".data.", ".left."));
        }
        else if (element.id.match(".left.")) {
            var element2 = document.getElementById(element.id.replace(".left.", ".data."));
        }
        if (element2) {
            element2.className += " " + name;
        }
    }
    catch(error){
        //	ignore errors
    }
};

var mouseout = function(element, name){
    try {
        element.className = element.className.replace(RegExp(" " + name, "g"), "");
        if (element.id.match(".data.")) {
            var element2 = document.getElementById(element.id.replace(".data.", ".left."));
        }
        else if (element.id.match(".left.")) {
            var element2 = document.getElementById(element.id.replace(".left.", ".data."));
        }
        if (element2) {
            element2.className = element2.className.replace(RegExp(" " + name, "g"), "");
        }
    }
    catch(error){
        //	ignore errors
    }
};
Alex (ActiveWidgets)
October 4,
thanks Alex, works brilliantly, exactly what I want....

The row now highlights when I hover over the first column, however does there need to be a second event to highlight the actual first column or is it a CSS rule.

Thanks for your help
Brian.
October 5,
dont worry, figured it out

.active-row-highlight .active-box-item {background-color: white}
October 5,
can you please post a reply saying to use this so you can get a "crosshair effect" with highlighting. thanks.... this looks like what I am looking for and have been looken for for quite some time.
Chris Lewis
October 10,

This topic is archived.

See also:


Back to support forum