Page loading twice in RadWindow

4 posts, 0 answers
  1. Balamurali Venkatesan
    Balamurali Venkatesan avatar
    94 posts
    Member since:
    Jul 2012

    Posted 08 Dec 2008 Link to this post

    HI,

    Iam using the Radwindow Manager and RadWindow to load a aspx page .I click on a link to open the aspx page to this radwindow.
    The problem is the page is loading twice.Iam uisng IE6 .

    Below is the code

    <telerik:RadWindowManager ID="radWindowManager" runat="server"
        KeepInScreenBounds="True" Modal="True" DestroyOnClose="True"
        ReloadOnShow="True" VisibleStatusbar="False"
        Behaviors="Close,Move,Resize,Maximize,Minimize"
        InitialBehaviors="Close,Move,Resize,Maximize,Minimize">
            <Windows>
                <telerik:RadWindow runat="server" NavigateUrl="" Behavior="Default"
                InitialBehavior="Default" Width="1000px" Height="600px"
                Title="View Reports" Left="150px" Top="" ID="ViewReportsDialog"
                DestroyOnClose="True" InitialBehaviors="Default" KeepInScreenBounds="True" Modal="True"
                ReloadOnShow="True" VisibleStatusbar="False">
                </telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>

    <telerik:RadCodeBlock ID="radCodeBlock" runat="server">

            <script type="text/javascript">
                    
            function ShowReports(loadId,fileName,ViewType)
            {
                //var reportPath="C:\\WhatsReport.pdf";
                //loadId=71;
                var reportname= "WhatsReport_" + loadId;
                var reportType="pdf";
                //var reportPath="C:\\" + reportname + "." + reportType;
                var url="InfactFileReports.aspx?LoadId=" + loadId + "&FileName=" + fileName + "&ReportType=" + reportType + "&ViewType=" + ViewType;
                   var radWindowProducts=window.radopen(url, "ViewReportsDialog");
                   radWindowProducts.setSize(1000,600);
                   radWindowProducts.center();
            }
        </script>

        </telerik:RadCodeBlock>

    Thanks
    Bala




    <telerik:RadCodeBlock ID="radCodeBlock" runat="server">

            <script type="text/javascript">
                    
            function ShowReports(loadId,fileName,ViewType)
            {
                //var reportPath="C:\\WhatsReport.pdf";
                //loadId=71;
                var reportname= "WhatsReport_" + loadId;
                var reportType="pdf";
                //var reportPath="C:\\" + reportname + "." + reportType;
                var url="InfactFileReports.aspx?LoadId=" + loadId + "&FileName=" + fileName + "&ReportType=" + reportType + "&ViewType=" + ViewType;
                   var radWindowProducts=window.radopen(url, "ViewReportsDialog");
                   radWindowProducts.setSize(1000,600);
                   radWindowProducts.center();
            }
        </script>

        </telerik:RadCodeBlock>

  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 09 Dec 2008 Link to this post

    Hi Balamurali,

    I see that you have set the ReloadOnShow property to true - this is the reason for such behavior.
    In addition, I suggest to check the following forum thread - I believe that the information there will be of help:
    http://www.telerik.com/community/forums/aspnet-ajax/window/opening-a-popup-shows-previously-opened-data-for-a-second.aspx



    Greetings,
    Georgi Tunev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. SWAT
    SWAT avatar
    12 posts
    Member since:
    Dec 2008

    Posted 08 Feb 2010 Link to this post

    Hi
    i see the same issue and i also have ReloadOnShow="true" .
    i read the other thread and still i don't know how to solve it. i mean i did not get any explanation on how to still use the ReloadOnShow and not having the page loading twice.

    I can't believe this is expected behaviour, is it?

    Ilan.
  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 11 Feb 2010 Link to this post

    Hi Ilan,

    I just answered your question in the support ticket that you sent us. For convenience I am pasting part of my reply below:

    By design, when a RadWindow is closed, it's object is not destroyed - the RadWindow remains on the page but it is hidden. This is done to provide caching features for the control so there would be no unnecessary round-trips to the server for loading the content page. Of course there are scenarios when this is not convenient - when RadWindow is used for a dialog for example. That is why we added the ReloadOnShow feature that reloads the content page when the RadWindow is shown.
    This feature however, leads to the behavior that you observe - when you call the window for a second time, you see for a brief time the cached content. This, however is needed because if we first load the Url in the window and then show it, a code in the content page that tries to set focus for example will break because the container is hidden. That is why we have the ShowContentDuringLoad property - it is fired at the moment when the RadWindow is shown and displays a loading animation until the content page finishes loading, e.g. window.onload is fired in the content.

    Best wishes,
    Georgi Tunev
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
Back to Top