Hi,
I would like to show a different template for the day and the week view of my scheduler. This works correctly when setting the 'AddDayEventTemplate' on the view. However when I change this to use 'AddDayEventTemplateId' (and reference the appropriate script tag) it doesn't show the template and just shows the default event template.
My code is:
If someone could let me know how to resolve that, it would be much appreciated.
Becky
I would like to show a different template for the day and the week view of my scheduler. This works correctly when setting the 'AddDayEventTemplate' on the view. However when I change this to use 'AddDayEventTemplateId' (and reference the appropriate script tag) it doesn't show the template and just shows the default event template.
My code is:
<
script
id
=
"day"
type
=
"text/x-kendo-template"
>
<
p
>Day event #=title#</
p
>
</
script
>
<
script
id
=
"week"
type
=
"text/x-kendo-template"
>
<
p
>Week event #=title#</
p
>
</
script
>
@(Html.Kendo().Scheduler<
SurveyPortal.Web.ViewModels.ScheduleViewModel
>()
.Name("adminScheduler")
.Editable(e=>e.Destroy(false).Resize(false))
.Views(v=>{
v.DayView(m => m.ShowWorkHours(true).AllDayEventTemplateId("day"));
v.WeekView(m => m.ShowWorkHours(true).AllDayEventTemplateId("week"));
v.MonthView(m => m.Selected(true));
})
.Resources(r=>{
r.Add(m => m.ItemType)
.Title("ItemType")
.DataValueField("ItemType")
.DataTextField("Text")
.ValuePrimitive(false)
.BindTo(new[] {
new {Text = "Survey", Value = Model.ScheduleItems},
new {Text = "Request", Value = Model.ScheduleItems }
});
})
.WorkDayStart(9, 0, 0)
.WorkDayEnd(18, 0, 0)
.DateHeaderTemplate("#=kendo.toString(date,'ddd dd/MM')#")
.MajorTimeHeaderTemplate("#=kendo.toString(date, 'H:mm' )#")
.BindTo(Model.ScheduleItems)
.HtmlAttributes(new { @class = "crm_scheduler" })
)
If someone could let me know how to resolve that, it would be much appreciated.
Becky