Hi All,
I've created a kendo scheduler to display report event date. and customized below config:
- overwrite the CSS ".k-event-template " to change mouse over cursor to printer
- enable double click on event item to edit .
- disable double click to Create item.
user may not know double to create/edit. it quite confusing for users. so we want to create extra button on top of calendar to open "ReportDateEditor" template.
any example to show trigger create/edit popup form from other ?
My code as below:
@(Html.Kendo().Scheduler<ReportDateScheduleViewModel>()
.Name("scheduler")
.Timezone("Asia/Hong_Kong")
.Messages(m => m.Editor(ed => ed.EditorTitle("Edit Report Date")))
.DataSource(src => src
.Model(m =>
{
m.Id(vm => vm.Id);
m.Field(vm => vm.RecordStatus).DefaultValue(ModelConstant.RecordStatusActive);
m.Field(vm => vm.Type).DefaultValue("WPI");
})
.Read("IndexData", "ReportDate")
.Update("UpdateReportDate", "ReportDate")
.Create("CreateReportDate", "ReportDate")
)
.Editable(e =>
{
e.Destroy(false);
e.Create(false);
e.Resize(false);
e.Update(true);
e.TemplateName("ReportDateEditor");
})
.Resources(resource => resource.Add(m => m.EventType)
.Title("Report Type")
.DataTextField("Text")
.DataValueField("Value")
.DataColorField("Color")
.BindTo(ViewBag.ReportTypeMetaData))
.Views(view => view.MonthView())
.Deferred()
)