You can limit the directions in which the event can be moved using onBeforeEventRender
event handler.
-
Use
moveVDisabled
andmoveHDisabled
properties to forbid moving in the specified direction. -
Moving can be disabled at all using
moveDisabled
. -
These values do not override the global
eventMoveHandling
setting (disabling moving using theeventMoveHandling
property has a higher priority).
See Also
-
If you want to prevent events from being moved to parent rows, please see parent resources.
-
If you want to disable selected cells as targets (e.g cells in the past), please see disabled cells.
-
If you need to implement custom rules, please see event moving customization.
JavaScript
<div id="dp"></div>
<script type="text/javascript">
var dp = new DayPilot.Scheduler("dp");
dp.durationBarVisible = true;
dp.durationBarMode = "PercentComplete";
dp.events.list = [
{
start: "2013-03-25T00:00:00",
end: "2013-03-25T12:00:00",
id: "123",
resource: "A",
text: "Event",
moveVDisabled: true,
moveHDisabled: false
}
]
// ...
dp.init();
</script>
ASP.NET WebForms
protected void DayPilotScheduler1_BeforeEventRender(object sender, DayPilot.Web.Ui.Events.Scheduler.BeforeEventRenderEventArgs e)
{
e.EventMoveVerticalEnabled = false;
}
Demo
ASP.NET MVC
protected override void OnBeforeEventRender(BeforeEventRenderArgs e)
{
e.EventMoveVerticalEnabled = false;
}