Opening window content still cached

6 posts, 0 answers
  1. TJ
    TJ avatar
    7 posts
    Member since:
    Feb 2009

    Posted 12 Jul 2009 Link to this post

    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

  2. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 13 Jul 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Cary
    Cary avatar
    18 posts
    Member since:
    Feb 2008

    Posted 24 Jul 2009 Link to this post

    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.
  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 27 Jul 2009 Link to this post

    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.
  6. Roy
    Roy avatar
    36 posts
    Member since:
    Jun 2008

    Posted 12 Aug 2009 Link to this post

    any news?
    i've been having the same problem.
    i should note that i have ReloadOnShow=true and ShowContentDuringLoad=false already set....
  7. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 12 Aug 2009 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017