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

Opening window content still cached

5 Answers 270 Views
Window
This is a migrated thread and some comments may be shown as answers.
TJ
Top achievements
Rank 2
TJ asked on 12 Jul 2009, 07:57 PM
Hi there,

I'm having trouble trying to remove/reload a popup rad window with the correct content.  It keeps loading the same content that was there the last time.  I tried using ReloadOnShow = true but that didn't work.  Can someone help me please?

RadWindow

 

newWindow = new RadWindow();

 

 

newWindow.NavigateUrl =

"MassSelections.aspx?rnd=" + random.Next().ToString();

 

newWindow.DestroyOnClose =

true;

 

newWindow.ReloadOnShow =

true;

 

newWindow.OnClientClose =

"RefreshGrid";

 

 

RadWindowManager1.Windows.Add(newWindow);

 

RadWindowManager1.DataBind();

Thanks,
Dean

5 Answers, 1 is accepted

Sort by
0
Tervel
Telerik team
answered on 13 Jul 2009, 07:10 AM
Hello TJ Dhani,

From the code provided it is not clear whether you ever change the URL of this particular window (be it on the client or at the server).  So, the problem might be that the URL never gets changed at all anyway.

On a side note, you could also add the ShowContentDuringLoad = false property to prevent the last loaded URL in the window from being visible when a new URL is being loaded.

Greetings,
Tervel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Cary
Top achievements
Rank 2
answered on 24 Jul 2009, 03:02 PM
I have the same exact issue as the above user.

We use this for our Commission Worksheet so our URL's looking something like this.

CommissionSheet.aspx?id=_______ .. The blank becomes the ID via Identity Column in the database and -1 is used for a new worksheet. It appears as if the RadWindow ignores the query string and assumes that if the actual page url is the same to show the previouis content.. The only way to fix this that I've found for our end users it to completely refresh the parent page and it will clear the rad window most of the time, other times they have to exit the browser completely.

Here is my code snippets.
        function openRadWindow(CommissionSheetId) { 
            var oWindow = radopen("CommissionSheet.aspx?Id=" + CommissionSheetId, "rwCommissionSheet"); 
            //oWindow.Center(); 
            oWindow.Maximize(); 
        } 
 
        function GetRadWindow() { 
            var oWindow = null
            if (window.radWindow) 
                oWindow = window.radWindow; 
            else if (window.frameElement.radWindow) 
                oWindow = window.frameElement.radWindow; 
 
            return oWindow; 
        } 

Inside of my grid I have a button that opens a worksheet.
                                <asp:TemplateField> 
                                    <ItemTemplate> 
                                         <input type="button" value="Edit" onclick="openRadWindow('<%#Eval("CommissionSheetId")%>')" /> 
                                    </ItemTemplate> 
                                </asp:TemplateField> 

I also have a create new button.
<input id="linkNew" runat="server" type="button" value="New Commission Sheet" visible="True" onclick="openRadWindow(-1);" /> 

And then of course my RadWindow.
    <telerik:RadWindowManager id="rwm" runat="server" Behaviors="Close,Maximize,Move,Reload,Resize" VisibleStatusbar="false" Style="" ShowContentDuringLoad="false" IconUrl="Images/Money-32x32.png" ReloadOnShow="true" > 
        <Windows> 
            <telerik:RadWindow ID="rwCommissionSheet" runat="server" Width="960px" Height="610px" /> 
        </Windows> 
    </telerik:RadWindowManager> 

Basically what happens is my grid get databound. When you click on the link it loads in a rad window a commission work sheet. After they are done with the worksheet they save and then exit. Once they exit if they try to open a different worksheet, or create a new one it will reopen a cached copy of what they just closed. I guess in short it is ignorning the query string and caching CommissionSheet.aspx?id=234 and then when you open CommissionSheet.aspx?id=532 it still shows up as 234, in fact if you right click and open properties it will even tell you for each load (234 and 532) that your page is CommissionSheet.aspx?id=234 even though the URL passed in was CommissionSheet.aspx?ie532. I verified this via debugger so the javascript and databinding is doing its job correctly.

I should note that I just added ReloadOnShow="true" to the RadWindow.. I am not sure what it is supposed to do exactly but if it seems to fix it I'll report back.
0
Georgi Tunev
Telerik team
answered on 27 Jul 2009, 08:27 AM
Hello Cary,

Indeed, ReloadOnShow=true should produce the desired result. I would also suggest to set ShowContentDuringLoad to false in order to prevent your users from seeing the actual reloading of the page.


Greetings,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Roy
Top achievements
Rank 1
answered on 12 Aug 2009, 07:24 AM
any news?
i've been having the same problem.
i should note that i have ReloadOnShow=true and ShowContentDuringLoad=false already set....
0
Georgi Tunev
Telerik team
answered on 12 Aug 2009, 11:04 AM
Hi Roy,

If you have set these properties and you are using a recent version of the control, there should not be a problem. Please open a support ticket and send us a small sample project where this issue could be reproduced - I will check it right away.


Sincerely yours,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Window
Asked by
TJ
Top achievements
Rank 2
Answers by
Tervel
Telerik team
Cary
Top achievements
Rank 2
Georgi Tunev
Telerik team
Roy
Top achievements
Rank 1
Share this question
or