Skip to content

onHeaderClick

fires on clicking the column header

function onHeaderClick(
// the column header
header: object,
// the native HTML event
event: object,
// an HTML element on which a click was caught
target: element
): boolean

boolean returning false will prevent further actions: headermenu opening, sorting, etc.

datagrid1.attachEvent("onHeaderClick", function(header, event, target){
this.sort({ by:header.column });
});

The first parameter of the handler function is the column header, e.g: {column:"columnId"}.