The onRowMoved event handler fires when the user finishes drag-and-drop row moving in the JavaScript Scheduler, after the default action configured by rowMoveHandling has been performed.
Declaration
DayPilot.Scheduler.onRowMoved(args)Parameters
args.external(boolean) - indicates that the row was dragged from an external source, such as a custom draggable item or another Scheduler instanceargs.source(DayPilot.Row) - dragged rowargs.target(DayPilot.Row) - target rowargs.position("child"|"before"|"after"|"forbidden") - drop position relative to the target row
Possible values of args.position:
"child"- drops the row as a child of the target row"before"- drops the row before the target row"after"- drops the row after the target row"forbidden"- the current target does not allow dropping the row
Examples
JavaScript
const dp = new DayPilot.Scheduler("dp", {
onRowMoved: (args) => {
console.log("Row moved", args.source, args.position, args.target);
if (args.external) {
console.log("The row came from an external source.");
}
},
// ...
});
dp.init();Angular
<daypilot-scheduler [config]="config"></daypilot-scheduler>config: DayPilot.SchedulerConfig = {
onRowMoved: (args) => {
console.log("Row moved", args.source, args.position, args.target);
if (args.external) {
console.log("The row came from an external source.");
}
},
// ...
};React
<DayPilotScheduler
onRowMoved={onRowMoved}
{/* ... */}
/>const onRowMoved = (args) => {
console.log("Row moved", args.source, args.position, args.target);
if (args.external) {
console.log("The row came from an external source.");
}
};Vue
<DayPilotScheduler
@rowMoved="onRowMoved"
<!-- ... -->
/>const onRowMoved = (args) => {
console.log("Row moved", args.source, args.position, args.target);
if (args.external) {
console.log("The row came from an external source.");
}
};See Also
Row Moving [doc.daypilot.org]
DayPilot.Scheduler.onRowMoving
DayPilot.Scheduler.rowMoveHandling
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot