Hello,
I have a Kendo Scheduler bound to datatable dynamically. The user will have this view open whole day and would like to refresh the data in current view updated every 5/10 minutes as set in some Settings. The user do not Need to interact or refresh the page. Is there some property which i can use or any idea how to achieve a Server read automatically every n minutes and refresh current view.
Thanks
Anamika
4 Answers, 1 is accepted
0
Hello Anamika,
You can call the Scheduler dataSource's read method every 5 or 10 min by using the setInterval method:
Dojo example in which the read method is called every 5 minutes (300000 milliseconds).
Regards,
Ivan Danchev
Progress Telerik
You can call the Scheduler dataSource's read method every 5 or 10 min by using the setInterval method:
function
readData() {
var
scheduler = $(
"#scheduler"
).data(
"kendoScheduler"
);
scheduler.dataSource.read();
scheduler.view(scheduler.view().name)
}
(
function
(){
setInterval(
function
(){ readData();}, 300000);
})();
Dojo example in which the read method is called every 5 minutes (300000 milliseconds).
Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.
0

Anamika
Top achievements
Rank 1
answered on 17 Aug 2017, 09:05 AM
Thanks Ivan
0

Mike
Top achievements
Rank 1
Iron
Iron
answered on 30 Aug 2018, 07:12 PM
Is there a way to check to see if the custom editor is running (currently open) and only perform the refresh if it isn't open? Otherwise, if someone is in the middle of creating an event it will refresh and the editor closes.
Thanks,
Mike
0
Hello Mike,
You can add the following condition, which checks whether the Scheduler's editor is open, to the readData function:
Regards,
Ivan Danchev
Progress Telerik
You can add the following condition, which checks whether the Scheduler's editor is open, to the readData function:
function
readData() {
var
scheduler = $(
"#scheduler"
).data(
"kendoScheduler"
);
if
($(
".k-scheduler-edit-form"
).length == 0) {
scheduler.dataSource.read();
scheduler.view(scheduler.view().name);
}
}
Regards,
Ivan Danchev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.