I am having a play with the daypilot pro controls within our application and like what I see so far.
However I am stuck with triggering the controls to rebind after I have performed an edit on an event and the new values have been written to the database.
So far I have followed the tutorials in using a navigator control with the calendar control to select a week, and I am successfully handling the VisibleRangeChanged event via CallBack to go and retrieve any events server sideand bind accordingly.
I have now got myself a context menu plumbed in with an edit option which when selected displays a custom window displaying details about the event which the user edits and saves. On saving the details in the window I am trying to work out how I get the calendar and navigator controls to perform a rebind to reflect the new changes.
I have been looking at the calendar client-side refreshCallBack() call hoping this would help. I tried adding OnRefresh="dpcMain_Refresh" to the calendar markup which I handle server side by performing the same databinding procedures I would use if handling the VisibleRangeChanged event on the navigator.
protected void dpcMain_Refresh(object sender, DayPilot.Web.Ui.Events.RefreshEventArgs e)
int days = (int)(dpnMain.VisibleEnd - dpnMain.VisibleStart).TotalDays;
UnitCalendarEventService UntCalSvc = new UnitCalendarEventService();
VList<UnitCalendarEvent> ActCalList = UntCalSvc.Search(PPSession.SesID, null, dpnMain.VisibleStart, dpnMain.VisibleStart.AddDays(7), null);
dpnMain.DataSource = ActCalList;
All that happens is the event disappears from the calendar view after the edit completes. If I select a previous week and then go back to the week the event was in it re-appears with the newly edited details.
I am sure I am doing something stupid, or not using the api the way I should be!