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

property '_continuousEvents'

1 Answer 139 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Jakub Wilk
Top achievements
Rank 2
Jakub Wilk asked on 22 Dec 2015, 11:02 AM

Hello,

 I'm using scheduler timeline (http://demos.telerik.com/kendo-ui/scheduler/timeline). 

When i try to add some dynamic data to scheduler datasource and resources, chrome console returns me error "Uncaught TypeError: Cannot read property '_continuousEvents' of undefined" 

var s = $("#appointmentScheduler").data('kendoScheduler');
var d = {
    AppointmentId: data.GetAppointmentsForContactsResult.AppointmentData[i].AppointmentId,
    title: data.GetAppointmentsForContactsResult.AppointmentData[i].Title,
    datas: data.GetAppointmentsForContactsResult.AppointmentData[i].Data,
    start: parseDateFromWCF(data.GetAppointmentsForContactsResult.AppointmentData[i].StartDate),
    end: parseDateFromWCF(data.GetAppointmentsForContactsResult.AppointmentData[i].EndDate),
    endTimezone: undefined,
    startTimezone: undefined,
    recurrenceException: undefined,
    recurrenceRule: undefined,
    description: undefined
};
 
s.dataSource.add(d);
var tmp = [];
tmp.push(self.contacts());
tmp.push(selected);
self.contacts(tmp);
self.groupDataSourceUpdate();
s.resources[0].dataSource.data(self.groupingDataSource());

s.refresh();

Filled data looks like:

var d = {
    AppointmentId:10,
    title: "test",
    datas: [3],
    start: Tue Dec 22 2015 13:00:00 GMT+0100 (Central European Standard Time),
    end: Tue Dec 22 2015 14:00:00 GMT+0100 (Central European Standard Time),
    endTimezone: undefined,
    startTimezone: undefined,
    recurrenceException: undefined,
    recurrenceRule: undefined,
    description: undefined
};
s.dataSource.add(d);
var tmp = [];
tmp.push(self.contacts());
tmp.push([{text: "test", value: 3}]);
self.contacts(tmp);
self.groupDataSourceUpdate();
s.resources[0].dataSource.data(self.groupingDataSource());

s.refresh();

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 23 Dec 2015, 09:12 AM
Hello Jakub,

Basically I would suggest to refresh the Scheduler by calling it's "view" method instead of the "refresh" method as demonstrated below:

s.view(s.view().name);

If the above change does not help please provide runable example where the issue is reproduced. This would help us pinpoint the exact reason for current behavior. 

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
Calendar
Asked by
Jakub Wilk
Top achievements
Rank 2
Answers by
Vladimir Iliev
Telerik team
Share this question
or