mario
mario

Reputation: 71

dynamic resource with kendo scheduler

I would to update a resource at runtime in the Telerik Scheduler widget.

I use this simple code to modify a well configured widget:

var scheduler = $("#scheduler").data('kendoScheduler');
var resourceDatasource = scheduler.resources[0].dataSource;
resourceDatasource.add({ text: "Meeting Room 201", value: 2, color: "#f58a8a" });
scheduler.refresh();    

output :

TypeError: undefined is not an object (evaluating 'c._continuousEvents')

Here a code that I edited from official guide

Upvotes: 1

Views: 1776

Answers (1)

mario
mario

Reputation: 71

I solved, instead of

scheduler.refresh();  

use

scheduler.view(scheduler.view().name);

Upvotes: 2

Related Questions