View data-reload=true, but it doesnt refresh data source

5 posts, 0 answers
  1. Filip
    Filip avatar
    35 posts
    Member since:
    Jul 2013

    Posted 04 Sep 2013 Link to this post

    Hello,

    did I understand the purpose of data-reload correctly? I would like to refresh my data source every time I navigate to a view, but it doesnt happen. Ajax request is not being sent.

    At the moment i am using dataSource.read() and I call it on data-show event on a view. However that makes 2 Ajax requests when i access the page for the first time, so its not a perfect solution.

    Hope I was clear, thank you in advance.
  2. David Silveria
    David Silveria avatar
    234 posts
    Member since:
    May 2006

    Posted 04 Sep 2013 Link to this post

    data-reload is applicable to remote views only, is that your case?
  3. Kendo UI is VS 2017 Ready
  4. Filip
    Filip avatar
    35 posts
    Member since:
    Jul 2013

    Posted 04 Sep 2013 Link to this post

    Yes my view is remote. I call it like this:

    app.navigate("views/myView.html");
    source: http://docs.kendoui.com/api/mobile/application#methods-navigate

    View contains a DOM component which is tied to remote data source. But this data source is read only first time I navigate to the view.
  5. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 05 Sep 2013 Link to this post

    Hello Fillip,

    Instead of reloading the entire view, I would like to suggest that you stick with calling read() in the show event, while setting the autoBind configuration option of the widget to false. 

    Regards,
    Petyo
    Telerik

    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  6. Filip
    Filip avatar
    35 posts
    Member since:
    Jul 2013

    Posted 05 Sep 2013 Link to this post

    Thank you, that solves it. 
Back to Top
Kendo UI is VS 2017 Ready