DayPilot.Scheduler.events.update

The events.update() method updates and redraws the event.

In the DayPilot Pro versions with integrated server-side part (ASP.NET MVC, ASP.NET WebForms, Java) you can also send the change to the server side using the returned object.

Declaration

DayPilot.Scheduler.events.update(e[, data]);

Parameters

  • e (DayPilot.Event) - event to be updated
  • data (object) - custom data to be sent to the server with the Notify event (optional; only applies to ASP.NET WebForms, ASP.NET MVC and Java versions)

The e object has to be acquired using find() or findRecurrent() methods.

Return Value

DayPilot.Action object that stores the action details.

Example

Change the text of an event with id '123' and redraw the event.

var e = dps.events.find('123');
e.text('New Event Name');  // update the event text
dps.events.update(e);

You can also change the properties of the raw data object directly:

var e = dps.events.find('123');
e.data.text = 'New Event Name';  // update the event text
dps.events.update(e);

See Also