I have a requirement to override the existing window to add an event as we have additional field we would like to display. The Template open correctly and populates the standard scheduler columns. However before opening the window I need to call our server to get a list of event types and a list of member (or possible members).
or index.cshtml looks like this
@(Html.Kendo().Scheduler<TalkBox.Mvc.ViewModels.Calendar.CalendarViewModel>()
.Name("scheduler")
.Date(DateTime.UtcNow)
.Timezone("Etc/UTC")
.Height(700)
.BindTo(Model)
.Views(views =>
{
views.DayView(dayView => dayView.Selected(true));
views.WeekView();
views.MonthView();
views.AgendaView();
})
.DataSource(d => d
.Model(m => m.Id(f => f.EventId))
.Read(u => u.Action("Read", "Calendar"))
.Update(u => u.Action("Update", "Calendar").Data("serialize"))
.Create(c => c.Action("Create", "Calendar").Data("serialize"))
.Destroy(delete => delete.Action("Delete","Calendar"))
)
.Editable(e => e.TemplateName("CalendarEditor"))
I thought that the .Read(u => u.Action("Read", "Calendar")) would fire the read function before the template is displayed.
How do I fire an event on open of the new template?
Damion
or index.cshtml looks like this
@(Html.Kendo().Scheduler<TalkBox.Mvc.ViewModels.Calendar.CalendarViewModel>()
.Name("scheduler")
.Date(DateTime.UtcNow)
.Timezone("Etc/UTC")
.Height(700)
.BindTo(Model)
.Views(views =>
{
views.DayView(dayView => dayView.Selected(true));
views.WeekView();
views.MonthView();
views.AgendaView();
})
.DataSource(d => d
.Model(m => m.Id(f => f.EventId))
.Read(u => u.Action("Read", "Calendar"))
.Update(u => u.Action("Update", "Calendar").Data("serialize"))
.Create(c => c.Action("Create", "Calendar").Data("serialize"))
.Destroy(delete => delete.Action("Delete","Calendar"))
)
.Editable(e => e.TemplateName("CalendarEditor"))
I thought that the .Read(u => u.Action("Read", "Calendar")) would fire the read function before the template is displayed.
How do I fire an event on open of the new template?
Damion