Hi
I'm have implemented scheduler in my application and I was able to fill the scheduler with data.
The way I'm filling data is calling the API on load with one parameter as today's date and another as 10 days from today and i'm able to get it but the issue is when I change the date range.On calling the API again the I'm getting the response but scheduler is not getting filled for those dates, the current format is
$scope.schedulerOption={
dataSource: {
data:myService.getData(),
schema: {
model: {
id: "taskId",
fields: {
taskId: { from: "TaskID", type: "number" },
title: { from: "Title", defaultValue: "No title"},
start: { type: "date", from: "Start" },
end: { type: "date", from: "End" },
description: { from: "Description" },
RoomID:{ from: "RoomID" },
isAllDay: { type: "boolean", from: "IsAllDay" }
}
}
}
}
}
I did try read(),data() and fetch() the give errors while running.
10 Answers, 1 is accepted
I have inspected both the code and the dojo provided but it is not quite clear how to replicate the issue. Would you please elaborate but sharing the exact steps and the expected behavior so we could inspect it locally and be more helpful with a possible solution?
Regards,
Plamen
Progress Telerik
Hi,
I have created the scheduler and inside the datasource object I'm calling the API for getting the data. Please check the link below...
the way i call the apis right now
On running the code on dojo you will be able to seein the console that the datasource object is getting updated but no new data is getting shown on the scheduler.
This is the issue I'm facing
Thanks
In such case we recommend using the setDataSource method of kendo Scheduler as for example in this dojo example.
Regards,
Plamen
Progress Telerik
Hi Plamen,
As you have suggested I did try out setDataSource() in my application and it throws an error
vm.service.getReservation(vm.startDate,vm.endDate).then(
function
(reservationResponse){
vm.roomReservation=reservationResponse;
scheduler.setDataSource({
data: vm.roomReservation,
schema: {
model: vm.model.getReservationChartModel()
}
});
});
This is how I call my API function and inside this I'm calling setDataSource function
It is not quite clear what may be causing the error. Would you please try to isolate the scenario with the error so we could inspect it and be more helpful with a possible solution?
Regards,
Plamen
Progress Telerik
I'm afraid as of yet we can't isolate the scenario as we haven't hosted our APIs. So, I was thinking if it is a problem the way I'm providing data property inside dataSource object.
As the documentation suggest we should use transport for read,update,delete etc ??
From the provided information there is not way to know what is going wrong in the application and what is causing the issue. In such case it is difficult to predict if using transport read and update will work the way you want it.
One thing that may be helpful is the scenario from this help topic where is described how to get only the events that are rendered in the current view from the server.
Regards,
Plamen
Progress Telerik
I was able to fix the error.I think one of the directives I'm using was interfering with the setDataSource(). After removing that it was working fine.
Thank you for sharing what solved the issue at your side.
Regards,
Plamen
Progress Telerik