Reputation: 195
I'm using a Kendo Scheduler. The dataSource loaded and has data.
When I open an event to edit I want to get fresh data from the server for this event. The event may be modified by other users, and I will see old loaded data.
Is there ability to get data from server before opening an event to edit?
Upvotes: 2
Views: 1687
Reputation: 12846
When selecting the event you want to edit, you can refresh the scheduler's datasource. This should ensure you have the latest data. To prevent unneeded refreshes you can check if you're selecting an event, or an empty square.
Something like this:
$("#scheduler").kendoScheduler({
selectable: true,
change: scheduler_change,
views: [
"day",
{ type: "week", selected: true },
"month",
"agenda",
"timeline"
],
etc...
});
function scheduler_change(e) {
if (e.events.length > 0) {
e.sender.dataSource.read();
}
}
Upvotes: 1