DayPilot.Gantt.onRowClicked

The onRowClicked event handler fires when the user clicks a task row header in the Gantt Chart component, after the default action specified by rowClickHandling.

Declaration

DayPilot.Gantt.onRowClicked(args)

Parameters

  • args.task - DayPilot.Task object representing the task.

  • args.x (number) - column index.

Examples

JavaScript

const gantt = new DayPilot.Gantt("dp", {
  rowClickHandling: "Enabled",
  onRowClicked: (args) => {
    DayPilot.Modal.alert("Clicked: " + args.task.id());
  },
  // ...
});
gantt.init();

Angular

<daypilot-gantt [config]="config"></daypilot-gantt>
config: DayPilot.GanttConfig = {
  rowClickHandling: "Enabled",
  onRowClicked: args => {
    DayPilot.Modal.alert("Clicked: " + args.task.id());
  },
  // ...
};

React

<DayPilotGantt
  rowClickHandling="Enabled"
  onRowClicked={onRowClicked}
  {/* ... */}
/>
const onRowClicked = (args) => {
  DayPilot.Modal.alert("Clicked: " + args.task.id());
};

Vue

<DayPilotGantt
  rowClickHandling="Enabled"
  @rowClicked="onRowClicked"
  <!-- ... -->
/>
const onRowClicked = (args) => {
  DayPilot.Modal.alert("Clicked: " + args.task.id());
};

See Also

DayPilot.Gantt Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript