
Rows displayed by the JavaScript Scheduler can be moved to a new position using drag and drop.
Includes resource tree support (insert before or after a node, as a child).
Custom rules using real-time event (onRowMoving).
CSS styling (drag handler, target position indicator, forbidden location)
JavaScript
Row moving can be enabled using rowMoveHandling ("Disabled").
You can implement custom rules (allowed operations) using the
onRowMovingevent handler.The Scheduler control fires the
onRowMoveandonRowMovedevents on drop (if the target position is not forbidden).
Demo
See also
DayPilot.Scheduler.rowMoveHandling property
Example
Scheduler config:
{
rowMoveHandling: "Update",
onRowMove: (args) => {
console.log("source: " + args.source.id + ", target: " + args.target.id + ", position: " + args.position);
},
onRowMoving: (args) => {
if (args.target.id === "B" && args.position === "child") {
args.position = "forbidden";
}
},
// ...
}Related Tutorials
Availability
Availability of this feature in DayPilot editions:
| Lite | Pro | |
|---|---|---|
| DayPilot for JavaScript | ||
| DayPilot for ASP.NET WebForms | ||
| DayPilot for ASP.NET MVC | ||
| DayPilot for Java |
DayPilot