DayPilot.Gantt.onRowEdit

The onRowEdit event handler fires when the user finishes inline row editing in the Gantt Chart, before the default action specified by rowEditHandling.

The default action can be canceled by calling args.preventDefault().

Declaration

DayPilot.Gantt.onRowEdit(args)

Parameters

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

  • args.newText (string) - new text provided by the user. Read/write since 2023.1.5529.

  • args.x (number) - column index. Available since 2023.1.5529.

  • args.preventDefault() - cancels the default action.

Examples

JavaScript

const gantt = new DayPilot.Gantt("dp", {
  rowClickHandling: "Edit",
  rowEditHandling: "Update",
  onRowEdit: (args) => {
    args.newText = args.newText.trim();
  },
  // ...
});
gantt.init();

Angular

<daypilot-gantt [config]="config"></daypilot-gantt>
config: DayPilot.GanttConfig = {
  rowClickHandling: "Edit",
  rowEditHandling: "Update",
  onRowEdit: args => {
    args.newText = args.newText.trim();
  },
  // ...
};

React

<DayPilotGantt
  rowClickHandling="Edit"
  rowEditHandling="Update"
  onRowEdit={onRowEdit}
  {/* ... */}
/>
const onRowEdit = (args) => {
  args.newText = args.newText.trim();
};

Vue

<DayPilotGantt
  rowClickHandling="Edit"
  rowEditHandling="Update"
  @rowEdit="onRowEdit"
  <!-- ... -->
/>
const onRowEdit = (args) => {
  args.newText = args.newText.trim();
};

See Also

Row Editing [doc.daypilot.org]

DayPilot.Gantt Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript