onHeaderClick

fires on clicking the column header

boolean onHeaderClick(object header,object event,element target);
headerobjectthe column header
eventobjectthe native HTML event
targetelementan HTML element on which a click was caught
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, e.g: {column:"columnId"}.

Back to top
Join Our Forum
We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.
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.