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

Scheduler's DataSource read method called over and over again

1 Answer 240 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Boris
Top achievements
Rank 1
Boris asked on 03 Feb 2016, 09:15 AM

Hello,

I have a DataSource connected to the Scheduler. The DataSource read data from the remote web service. I proces data returned from the service with the function assigned to DataSource.schema.data.

In some occassions, reading data from webresource is called over and over again. I would say that it happens when there are no data returned from the web service. That means that there are no events and my function (assigned to DataSource.schema.data) returns an empty array.

Is it possible that when I return an empty array, the DataSource's read is called again? Or am I wrong and I should seek for the error somewhere else?

 

Thanks for answers,

Boris

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 05 Feb 2016, 10:03 AM
Hello Boris,

By default, the widget requests all available events and will not perform any additional requests any further.

If the scheduler is configured to perform server filtering, then it will call service on every view change/navigate. This demo shows how this can be implemented: Basically, the widget will request when the user tries to navigate to next/pref/different view. If the service returns empty array, then the widget will not show anything. It will not continue to request the service until the view is changed again:
Please note that the best place to project (filter) your data is on the server or in the transport.read callback.

Let me know if I am missing something.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Scheduler
Asked by
Boris
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or