The onRowMove event is fired by the JavaScript Gantt Chart when the user finishes drag and drop row moving, before the default action (specified by the rowMoveHandling property).
The default action can be canceled by calling args.preventDefault()
.
args.external
(boolean) - indicates an external source of the task - another Gantt Chart instance or a custom source (read-only)
args.source
- holds a DayPilot.Task object representing the source task
args.target
- holds a DayPilot.Task object representing the target task
args.position
(string) - the new position relative to target: "before"
| "after"
| "child"
| "forbidden"
args.keepSource()
- call this method to keep the task in the source Gantt Chart as well (when the row is moved from another Scheduler)
args.preventDefault()
- cancels the default action
Gantt Chart config:
{
onRowMove: (args) => {
console.log("Task moved to: " + args.target.text() + " (" + args.position + ")");
},
// ...
}