Auto-binding a ListView to a DataSource always calls remote service, even if it already has data loaded

3 posts, 1 answers
  1. Jonathan M
    Jonathan M avatar
    16 posts
    Member since:
    Sep 2012

    Posted 21 Feb 2013 Link to this post

    We have a DataSource bound to remote service. If we call the query function from one view, and then navigate to a view that has a ListView that auto-binds to the same DataSource, it always calls the remote service again, even if the DataSource already has data loaded. We would expect it to bind to the DataSource and use the data that is already loaded, rather than make the same call back to the remote server again.

    We have found a workaround, in that we can disable auto-binding and call the refresh function on the ListView in the init event of the view, but that does not seem ideal, when really all we want it to do is auto-bind the ListView to the DataSource, and only fetch data if it is not loaded yet.

    Jonathan Marston
  2. Answer
    Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 25 Feb 2013 Link to this post

    Hello Jonathan,

     
    The DataSource will call service everytime if any of the server operations are enabled. This is expected, because server is the one responsible for paging, filtering and etc. The only feasible solution for the described scenario is to set the autoBind to false and render the items manually on init event of the View. In other words the solution you already taken.

    Regards,
    Georgi Krustev
    the Telerik team
    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
  4. Jonathan M
    Jonathan M avatar
    16 posts
    Member since:
    Sep 2012

    Posted 25 Feb 2013 Link to this post

    Thanks for the reply. The solution we have works fine for us. Just wanted to be sure we weren't doing something against what was intended.

    Jonathan
Back to Top