Scheduler: AJAX Event Resizing
Drag & drop event resizing is disabled by default.
It can be enabled using EventResizeHandling property. It has to be set to one of the following values:
CallBack event handling will fire a server-side event handler (OnEventResize) using an AJAX callback.
JavaScript event handling will fire the JavaScript code specified in EventResizeJavaScript.
Server-Side Handler
The EventResize event can be handled by overriding the OnEventResize method in the DayPilotScheduler implementing class:
protected override void OnEventResize(EventResizeArgs ea)
{
new EventManager(Controller).EventMove(ea.Id, ea.NewStart, ea.NewEnd, ea.Resource);
Update();
}
protected override void OnFinish()
{
// only load the data if an update was requested by an Update() call
if (UpdateType == CallBackUpdateType.None)
{
return;
}
Events = new EventManager(Controller).FilteredData(StartDate, EndDate, (string)ClientState["filter"]).AsEnumerable();
DataStartField = "start";
DataEndField = "end";
DataTextField = "text";
DataIdField = "id";
DataResourceField = "resource";
}
If any changes are made to the event data set (which is the
typical case), it is necessary to redraw the event set on the client
side using an Update() call.
See also: