4

We are using Kendo Scheduler UI of telerik in our project, we are trying to create events programmatically without popup.

For creating new event, we are using a submit button. We can create new event in the server by clicking on that button , however we can't push event to the kendo scheduler without refreshing the page.

So far we have tried 2 different approaches: 1. Using addEvent method :

// comes up with the pop with given json data. We don't want to display the pop up.    
$("#scheduler").data("kendoScheduler").addEvent(eventJson);
  1. we tried to push/add cloned data got from the response.
var data = $("#scheduler").data("kendoScheduler");
data._items.push(clonedJsonModifedWithOurNewData);
data.refresh(); // didn't do anything.

So it would be really helpful if any can just a little bit of code and give examples in http://dojo.telerik.com/epiJo/2 to create events programmatically in kendo scheduler.

Thank you.

Md. Alim Ul Karim
  • 2,401
  • 2
  • 27
  • 36
Rahman40
  • 71
  • 5

1 Answers1

1

I failed to load the Dojo sample which you provided. But here are 2 options for you which will be helpful i guess

1) Add your event like this.

$("#scheduler").data("kendoScheduler").dataSource.add(eventJson);

2) Or directly first save the event in Database and simply call the read method of the scheduler like this

$("#scheduler").data("kendoScheduler").dataSource.read();

hope this helps you