event editing

Inline editing has to be activated by mapping one of the user actions to "Edit" (see event click).

JavaScript

<div id="dp"></div>
<script type="text/javascript">
  var dp = new DayPilot.Calendar("dp");
  dp.eventClickHandling = "Edit";
  dp.onEventEdited = function(args) {
    dp.message("Event text changed to " + args.newText);
  };
  // ...
  dp.init();
</script>

ASP.NET WebForms

Client side

<DayPilot:DayPilotCalendar runat="server" id="DayPilotCalendar1"
  ...
  EventClickHandling="Edit"
  EventEditHandling="CallBack"
  OnEventEdit="DayPilotCalendar1_EventEdit"
/>

Server side

protected void DayPilotCalendar1_EventEdit(object sender, EventEditEventArgs e)
{ UpdateEventText(e.Id, e.NewTest); // your method DayPilotCalendar1.DataSource = LoadData(); // your method
DayPilotCalendar1.DataBind();
DayPilotCalendar1.Update();
}

ASP.NET MVC

Client side:

@Html.DayPilotCalendar("dps", new DayPilotCalendarConfig {
  BackendUrl = ResolveUrl("~/Calendar/Backend"),
  ...
  EventClickHandling = EventClickHandlingType.Edit,
EventEditHandling = EventEditHandlingType.CallBack })

Server side:

protected override void OnEventEdit(EventEditArgs e)
{
  new EventManager(Controller).UpdateText(e.Id, e.NewText);
  UpdateWithMessage("Event updated.");
}