3.2.0

obj.onHeaderMouseOver

In some cases - extended grid 2.0 - I do not want the onmouseover effect on a header (when a grid or (some) columns are not sortable).

One solution is to change the css. But I also tried javascript. I could not find 'the' solution.

obj.onHeaderClicked=function(event,index){return true;} works (for a onmouseclick), but an obj.onHeaderMouseOver=function(event,index){event.cancelBubble=true;return true;} doesn't work.

This one works, obviously because the onHeaderMouseOver has an error-trap: the 'AW.header.ignoseMouse' is not valid, but this does want I want:
obj.onHeaderMouseOver=function(){AW.header.ignoreMouse=true;};

Is there a 'cleaner' coding for this? How can I override/change or detach the AW default onHeaderMouseOver?
Eric Aarts
October 24,
The names of the mouse events and css classes are derived from the value of the special 'aw' attribute which is 'header' for the grid header template. If you change it to something else you will effectively disable mouseover effects. As a side effect it will also change the names of the mouse events triggered by this template, for example -

var obj = new AW.UI.Grid;
    obj.setCellData(function(col, row){return col + "." + row});
    obj.setHeaderText("header");
    obj.setColumnCount(10);
    obj.setRowCount(10);

//	disable column-1 header
    obj.getHeaderTemplate(1).setAttribute("aw", "disabledHeader");

    obj.onHeaderClicked = function(event, i){
        alert("header: " + i);
    }

    obj.onDisabledHeaderClicked = function(event, i){
        alert("disabled header: " + i);
    }

    document.write(obj);
Alex (ActiveWidgets)
October 26,

This topic is archived.

See also:


Back to support forum