Hi there,
I am using the latest (8th December 2008) release of the DayPilot DEMO.
I have set EventMoveHandling="CallBack" and in the c# code on the server I have the following;
protected void DayPilotScheduler1_EventMove(object sender, DayPilot.Web.Ui.Events.EventMoveEventArgs e)
{
using (FTElectronicDiary ed = new FTElectronicDiary())
{
JobDetail job = ed.GetSingleJobDetail(int.Parse(e.Value));
if (e.NewResource != e.OldResource) { job.InspectorId = int.Parse(e.NewResource); }
job.StartDateTime = e.NewStart;
job.EndDateTime = e.NewEnd;
ed.UpdateJob(job);
LoadSchedulerEvents();
DayPilotScheduler1.Update(DayPilot.Web.Ui.Enums.CallBackUpdateType.EventsOnly);
}
}
My problem is that whenever I call the Update method on DayPilotScheduler1 , instead of the event just moving to it's new location, I get multiple copies of the event appearing on the scheduler display vertically.
In other words, the same event appears to repeat accross several Resources.
I have checked the data I am assigning to the datasource property and it only contains one instance of each event.
The method call I have to get the event data is the same one I use to initially populate the events at page load.
If I perform a page refresh, the display renders as it should do and the event has moved to the correct location.
It would seem from my perspective that there is a bug in the Update method.
The LoadSchedulerEvents() method in the above code does the following;
private void LoadSchedulerEvents()
{
JobDetail[] jobs;
jobs = Utility.GetJobsDateRange(DayPilotScheduler1.StartDate, DayPilotScheduler1.StartDate.AddDays(1));
Session["jobs"] = jobs;
DayPilotScheduler1.DataSource = jobs;
DayPilotScheduler1.DataBind();
}
Please can you advise if this is an error on my part or if there is a genuine bug. I could not find any mention of this in the forums.
Kind regards,
Joe Tyrrell