3.2.0

disable header

It appears 'obj.getHeaderTemplate(1).setAttribute("aw", "disabledHeader"); ' is not working in version 2.5.1 (vista-css)? It did work in 2.0!

Alex (ActiveWidgets) on Thursday, October 26, 2006 wrote:
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)
Thursday, October 26, 2006
Eric
February 5,
AW 2.5 no longer uses custom 'aw' attribute to trigger mouse events and style changes. In the new version the event manager calls the event handlers attached to the template object (onMouseOver/onMouseOut). Here is how you can disable mouseover effect in AW 2.5 -

var disabled = new AW.Grid.Header;
disabled.onMouseOver = null;
disabled.onMouseOut = null;

obj.setHeaderTemplate(disabled);
Alex (ActiveWidgets)
February 6,
OK: works!
February 6,

This topic is archived.

See also:


Back to support forum