Skip to main content



Fires on clicking a header of a group

If a click is done over a header of a swimlane, the event will be fired on the subheader of the swimlane


groupHeaderClick: (
id: string | number,
event: MouseEvent,
subHeaderId?: string
) => void;


The callback of the event takes the following parameters:

  • id - (required) the id of a group
  • event - (required) a native HTML event object
  • subHeaderId - (optional) the id of a subheader of a swimlane


// initializing Diagram
const diagram = new dhx.Diagram("diagram_container", {
type: "default"
// loading data;

// attaching a handler to the event"groupHeaderClick", (id, event, subheaderId) => {
console.log(id, event, subheaderId);

Change log: Added in v4.0

Related article: Event handling