Add extra button for create event for Scheduler

2 posts, 0 answers
  1. Flora
    Flora avatar
    1 posts
    Member since:
    Apr 2014

    Posted 24 Nov 2014 Link to this post

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

  2. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2194 posts

    Posted 26 Nov 2014 Link to this post

    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!
     
Back to Top