onHeaderClick

fires on clicking the column header

boolean onHeaderClick(object header,object event,element target){ ... };

Parameters

headerobjectthe column header
eventobjectthe native HTML event
targetelementan HTML element on which a click was caught

Returns

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

Example

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

Details

The first parameter of the handler function is the column header that comes as in: {column:"columnId"}.

Back to top
If you have not checked yet, be sure to visit site of our main product Webix javascript ui framework and page of javascript datatable product.