Hi,
We have a scheduler with two views - a week view and a timeline view. When in the week view all events seem to show - however when in the timeline view any event that finishes on the day in question disappears. The start date does not seem to matter. For events that cross days they appear on any day that isnt the end date - so for example if i have an event that starts Monday through to Thursday the event will show on Monday, Tuesday and Wednesday but not Thursday. Navigating to Thursday does display the event briefly but then the event disapears.
The Razor code for the scheduler is:
@(Html.Kendo().Scheduler<F0CUSWeb.Models.PlanningScheduleViewModel>()
.Name("apptScheduler")
.AutoBind(true)
.HtmlAttributes(new { style = "height: 80vh;" })
.MajorTick(120)
.Editable(editable =>
{
editable.Destroy(false);
editable.Move(false);
editable.Resize(false);
editable.Confirmation(true);
})
.Views(views =>
{
views.TimelineWeekView(timeline =>
{
timeline.DateHeaderTemplate("<span class='k-link k-nav-day'>#=kendo.toString(date, 'ddd dd MMM yy')#</span>");
timeline.MajorTimeHeaderTemplate("<span class='k-link k-nav-day' style='font-size:12px'>#=kendo.toString(date, 'HH:mm')#</span>");
timeline.Title("Week View");
timeline.ColumnWidth(30);
timeline.MajorTick(480);
timeline.WorkDayStart(new DateTime(2010, 1, 1, 0, 0, 0));
timeline.WorkDayEnd(new DateTime(2010, 1, 1, 23, 59, 59));
timeline.ShowWorkHours(false);
});
views.TimelineView(timeline =>
{
timeline.DateHeaderTemplate("<span class='k-link k-nav-day'>#=kendo.toString(date, 'ddd dd MMM yy')#</span>");
timeline.MajorTimeHeaderTemplate("<span class='k-link k-nav-day' style='font-size:12px'>#=kendo.toString(date, 'HH:mm')#</span>");
timeline.Title("Day View");
timeline.StartTime(new DateTime(2010, 1, 1, 6, 0, 0));
timeline.EndTime(new DateTime(2010, 1, 1, 20, 0, 0));
timeline.ColumnWidth(20);
timeline.MajorTick(60);
});
})
.Events(e =>
{
e.DataBound("apptSchedulerBound");
e.Navigate("onSchedulerNavigate");
})
.DataSource(ds =>
{
ds.Events(events =>
{
events.Error("endAnimation");
});
ds.Read(read => read.Action("GetSchemeSchedule", "Planning").Data("schemeScheduleString"));
})
.Group(group => group.Resources("Gang").Orientation(SchedulerGroupOrientation.Vertical))
.Resources(resource =>
{
resource.Add(m => m.Gang)
.Title("Gang")
.Name("Gang")
.DataSource(ds => ds
.Custom()
.Transport(transport => transport.Read(read => read.Action("GetGangsForSchemePlanning", "Planning")/*.Data("getGangsForAppts")*/))
.Schema(s => s
.Data("Data")
.Total("Total")
.Model(m =>
{
m.Id("ID");
m.Field("Name", typeof(string));
})))
.Multiple(true)
.DataValueField("ID")
.DataTextField("Name");
})
.EventTemplateId("eventTemplate")
)
Any help would be appreciated as it is driving us mad!
Thanks
Hello Michael,
Looking at the declaration of the Scheduler, there doesn't seem to be anything problematic in the configuration that could explain the described problematic behavior. Then again there are event handlers attached to the Scheduler and a template ("eventTemplate") and we are unsure what is going on in them: "apptSchedulerBound", "onSchedulerNavigate", "schemeSchedulerString", and whether the custom logic in them might be causing the issue.
Could you attach a sample project that demonstrates the problematic behavior for further investigation? The Scheduler, its handlers, and a list containing a couple of events returned by the respective "read" action should suffice.