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

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

4 Answers 362 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Filip
Top achievements
Rank 1
Filip asked on 04 Sep 2013, 12:49 PM
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.

4 Answers, 1 is accepted

Sort by
0
David Silveria
Top achievements
Rank 1
answered on 04 Sep 2013, 01:41 PM
data-reload is applicable to remote views only, is that your case?
0
Filip
Top achievements
Rank 1
answered on 04 Sep 2013, 03:01 PM
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.
0
Petyo
Telerik team
answered on 05 Sep 2013, 07:02 AM
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.
0
Filip
Top achievements
Rank 1
answered on 05 Sep 2013, 12:54 PM
Thank you, that solves it. 
Tags
General Discussions
Asked by
Filip
Top achievements
Rank 1
Answers by
David Silveria
Top achievements
Rank 1
Filip
Top achievements
Rank 1
Petyo
Telerik team
Share this question
or