The onRowMove event handler fires when the user finishes drag and drop row moving in the Gantt Chart, before the default action specified by rowMoveHandling.
The default action can be canceled by calling args.preventDefault().
DayPilot.Gantt.onRowMove(args)args.external (boolean) - indicates an external source of the task, such as another Gantt Chart instance or a custom source.
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".
args.keepSource() - keeps the task in the source Gantt Chart as well, for example when moving a row from another Scheduler.
args.preventDefault() - cancels the default action.
JavaScript
const gantt = new DayPilot.Gantt("dp", {
rowMoveHandling: "Update",
onRowMove: (args) => {
if (args.external) {
args.keepSource();
}
},
// ...
});
gantt.init();Angular
<daypilot-gantt [config]="config"></daypilot-gantt>config: DayPilot.GanttConfig = {
rowMoveHandling: "Update",
onRowMove: args => {
if (args.external) {
args.keepSource();
}
},
// ...
};React
<DayPilotGantt
rowMoveHandling="Update"
onRowMove={onRowMove}
{/* ... */}
/>const onRowMove = (args) => {
if (args.external) {
args.keepSource();
}
};Vue
<DayPilotGantt
rowMoveHandling="Update"
@rowMove="onRowMove"
<!-- ... -->
/>const onRowMove = (args) => {
if (args.external) {
args.keepSource();
}
};