When I try to open Window it has to fetch data from controller. but it display cache data. Is there any solution so that I get latest data?
<% Html.Telerik().Window()
.Name("UserHistory")
.Modal(true)
.Buttons(b => b.Maximize().Close())
.ClientEvents(t => t.OnOpen("Window_onRefresh"))
.LoadContentFrom("UserHistory", "UserLog", new { Id = Model.Id })
.Render();
%>
function Window_onRefresh() {debugger;
var window = $('#UserHistory').data('tWindow');
window.refresh();
}
5 Answers, 1 is accepted
The refresh button on demo pages is not working: Clientside demo
It works OK for me. You can check this video.
All the best,Atanas Korchev
the Telerik team
Thanks for the quick response.
It looks good in de video.
Its not working in IE8.
I've tested it in Firefox and its working fine.
.ClientEvents(t => t.OnLoad("Window_onLoad")) <script type="text/javascript"> function Window_onLoad() { $.ajaxSetup({ cache: false }); } <script>I'm afraid its turning off all caching.
Good catch! You can suppress the caching explicitly for the window if you add the cache: false to the $.ajax call in the ajaxRequest function in telerik.window.js. Your Telerik points have been updated for the bug report. The fix will be available in upcoming builds.
Kind regards,Alex Gyoshev
the Telerik team