我创建了一个包含kendo调度程序的视图,当我为add事件创建模板并添加了tabstrip时,它没有编译,我有一个bug
MyView的
@(Html.Kendo().Scheduler<MeetingViewModel>()
.Name("scheduler")
.Date(new DateTime(2016, 4, 01))
.StartTime(new DateTime(2016, 4, 01, 00, 00, 00))
.Height(600)
.Views(views => {
views.DayView();
views.WeekView(weekView => weekView.Selected(true));
views.MonthView();
views.AgendaView();
})
.Editable(editable => {
editable.TemplateName("EditMeeting");
})
.Timezone("Etc/UTC")
.Events(e=>e.Edit("scheduleEdit"))
.DataSource(d => d
.Model(m => {
m.Id(f => f.IDMeeting);
m.Field(f => f.NumMeeting).DefaultValue("No title");
})
.Events(e => e.Error("error_handler"))
.Read("Meeting_Read", "Meeting")
.Create("Meeting_Create", "Meeting")
.Destroy("Meeting_Destroy", "Meeting")
.Update("Meeting_Update", "Meeting")
)
)
我的模板EditMeeting
@(Html.Kendo().TabStrip()
.Name("tabstrip")
.Items(tabstrip =>
{
tabstrip.Add().Text("Générale").Selected(true).Content(@<text>
<label>test</label>
</text>);
}
)
)
错误
kendo.all.min.js:9 Uncaught Error: Invalid template:'<div class="k-widget k-tabstrip k-header" id="tabstrip"><ul class="k-reset k-tabstrip-items">
<li class="k-item k-state-default k-state-active"><a class="k-link" href="#tabstrip-1">G&\\#233;n&\\#233;rale</a></li></ul><div class="k-content k-state-active" id="tabstrip-1" style="display:block"></div></div><script>
jQuery(function(){jQuery("\#tabstrip").kendoTabStrip({});});</script>' Generated code:'var o,e=kendo.htmlEncode;with(data){o='<div class="k-widget k-tabstrip k-header" id="tabstrip"><ul class="k-reset k-tabstrip-items"><li class="k-item k-state-default k-state-active"><a class="k-link" href="';tabstrip-1">G&\#233;n&\#233;rale</a></li></ul><div class="k-content k-state-active" id="tabstrip-1" style="display:block"></div></div><script> jQuery(function(){jQuery("#tabstrip").kendoTabStrip({});});</script>;o+=;}return o;'