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

[Solved] Window Refresh not working

5 Answers 196 Views
Window
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ravi Keshwani
Top achievements
Rank 1
Ravi Keshwani asked on 24 Nov 2010, 12:53 PM

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

Sort by
0
arjen
Top achievements
Rank 1
answered on 01 Dec 2010, 08:54 AM
I'm also looking forward for a solution.

The refresh button on demo pages is not working: Clientside demo
0
Atanas Korchev
Telerik team
answered on 01 Dec 2010, 09:17 AM
Hi arjen,

 It works OK for me. You can check this video.

All the best,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
arjen
Top achievements
Rank 1
answered on 01 Dec 2010, 09:32 AM
Hi Atanas,

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.
0
arjen
Top achievements
Rank 1
answered on 01 Dec 2010, 07:54 PM
Its working in IE with:
 
.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.
0
Alex Gyoshev
Telerik team
answered on 02 Dec 2010, 02:15 PM
Hello arjen,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Window
Asked by
Ravi Keshwani
Top achievements
Rank 1
Answers by
arjen
Top achievements
Rank 1
Atanas Korchev
Telerik team
Alex Gyoshev
Telerik team
Share this question
or