Skip to main content

onGridHeaderClick

Description​

Fires when the user clicks on the grid's header

onGridHeaderClick: (name: string, e: Event) => boolean;

Parameters​

  • name - (required) string - the name attribute of the column which header the user clicks on
  • e - (required) Event - a native event object

Returns​

  • result - (boolean) - defines whether the default action of the event will be triggered (true) or canceled (false)

Example​

gantt.attachEvent("onGridHeaderClick", function(name, e){
//any custom logic here
return true;
});

Details​

Returning false will cancel the default handler (adding a new task on the "plus" button click or sorting a column)

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.