DayPilot.Gantt.onRowMoved

The onRowMoved event handler fires when the user finishes drag and drop row moving in the Gantt Chart, after the default action specified by rowMoveHandling.

Declaration

DayPilot.Gantt.onRowMoved(args)

Parameters

  • args.external (boolean) - indicates an external source of the task, such as another Gantt Chart instance or a custom source. Available since 2024.4.6270.

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

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

  • args.position (string) - new position relative to the target: "before", "after", "child", or "forbidden".

Examples

JavaScript

const gantt = new DayPilot.Gantt("dp", {
  rowMoveHandling: "Update",
  onRowMoved: (args) => {
    DayPilot.Modal.alert("Moved to: " + args.target.text() + " (" + args.position + ")");
  },
  // ...
});
gantt.init();

Angular

<daypilot-gantt [config]="config"></daypilot-gantt>
config: DayPilot.GanttConfig = {
  rowMoveHandling: "Update",
  onRowMoved: args => {
    DayPilot.Modal.alert("Moved to: " + args.target.text() + " (" + args.position + ")");
  },
  // ...
};

React

<DayPilotGantt
  rowMoveHandling="Update"
  onRowMoved={onRowMoved}
  {/* ... */}
/>
const onRowMoved = (args) => {
  DayPilot.Modal.alert("Moved to: " + args.target.text() + " (" + args.position + ")");
};

Vue

<DayPilotGantt
  rowMoveHandling="Update"
  @rowMoved="onRowMoved"
  <!-- ... -->
/>
const onRowMoved = (args) => {
  DayPilot.Modal.alert("Moved to: " + args.target.text() + " (" + args.position + ")");
};

See Also

DayPilot.Gantt Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript