This is a migrated thread and some comments may be shown as answers.

Add extra button for create event for Scheduler

1 Answer 488 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Flora
Top achievements
Rank 1
Flora asked on 24 Nov 2014, 10:47 AM

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()
              )

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 26 Nov 2014, 09:08 AM
Hi Flora,

You can use the "addEvent" and "editEvent" methods of the Scheduler on the client side - for more information you can check the Scheduler client side API:
Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Scheduler
Asked by
Flora
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or