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

Page loading twice in RadWindow

3 Answers 251 Views
Window
This is a migrated thread and some comments may be shown as answers.
Balamurali Venkatesan
Top achievements
Rank 1
Balamurali Venkatesan asked on 08 Dec 2008, 04:12 PM
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>

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 09 Dec 2008, 02:29 PM
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.
0
SWAT
Top achievements
Rank 2
answered on 08 Feb 2010, 05:37 PM
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.
0
Georgi Tunev
Telerik team
answered on 11 Feb 2010, 10:43 AM
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.
Tags
Window
Asked by
Balamurali Venkatesan
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
SWAT
Top achievements
Rank 2
Share this question
or