这是我的日程安排代码,按提供商分组
@(Html.Kendo().Scheduler<LTC_TABXML.Entity.Projection>()
.Name("AppointmentDataScheduler")
.Date(DateTime.Now)
.ShowWorkHours(true)
.AllDaySlot(false)
.EventTemplateId("customAllDayTemplate")
.Views(views => views.DayView(dayview => dayview.Selected(true)))
.Group(group => group.Resources("Providers"))
.Resources(resource => resource.Add(m => m.ProviderID)
.Title("Company")
.Name("Providers")
.DataTextField("ProviderName")
.DataValueField("ID")
.DataSource(ds => ds.Read(read => read.Action("GetProvider", "Home")))
).Editable(false)
.Height(800)
.BindTo(Model))
这是我想要隐藏组列的多选,但它只是将事件隐藏在日程表中
@(Html.Kendo().MultiSelect()
.Name("Provider")
.Placeholder("Select Providers...")
.DataTextField("ProviderName")
.DataValueField("ID")
.Events(e => e.Change("Change").Select("Select")
).DataSource(ds => ds.Read(read => read.Action("GetProvider", "Home"))))
这个脚本我叫
function Select(e) {
};
function Change(e) {
var value = this.value();
var scheduler = $("#AppointmentDataScheduler").data("kendoScheduler");
scheduler.dataSource.filter({
operator: function (task) {
return $.inArray(task.ProviderID, value) >= 0;
}
});