Scheduler's DataSource read method called over and over again

2 posts, 0 answers
  1. Boris
    Boris avatar
    15 posts
    Member since:
    Aug 2015

    Posted 03 Feb Link to this post

    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

  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 05 Feb Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
Back to Top