RadWindow reloaded after a parent reload

3 posts, 1 answers
  1. Pierre-Antoine DOUCHET
    Pierre-Antoine DOUCHET avatar
    11 posts
    Member since:
    Oct 2009

    Posted 05 Nov 2014 Link to this post


    I've got an issue with one of my RadWindow. I want to refresh the parent page when there's a change in the RadWindow. For that, I use an arg when I close the RadWindow and catch that in the parent page :

    RadWindow script :
    function GetRadWindow() {
        var oWindow = null;
        if (window.radWindow)
            oWindow = window.radWindow;
        else if (window.frameElement.radWindow)
            oWindow = window.frameElement.radWindow;
        return oWindow;
    function CloseWindowsWithArgument(arg) {
        var oWindow = GetRadWindow();
    function CloseWindows() {
        var oWindow = GetRadWindow();

    The two close functions are call like that :
    string scriptCloseWindow = modifiedItemCount > 0 ? "CloseWindowsWithArgument('NewData')" : "CloseWindows()";
    ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "saveCustomRainFall", scriptCloseWindow, true);

    In the parent page, I've got this script :
    function WindowsRainFallNewClose(sender, eventArgs) {
        // Explicitely instructed to reload
        if (eventArgs._argument != null) {

    The RadWindow is declared like that :
    <telerik:RadWindowManager ID="Singleton" runat="server" Behavior="Default" InitialBehavior="None" EnableEmbeddedSkins="False"
        Left="" meta:resourcekey="SingletonResource1" Style="display: none;" Top="" VisibleOnPageLoad="False" EnableViewState="False">
            <telerik:RadWindow ID="DialogWindow" Skin="Bayer" EnableEmbeddedSkins="false" Behaviors="Maximize,Move,Reload,Resize,Close"
                ReloadOnShow="True" ShowContentDuringLoad="False" VisibleOnPageLoad="False" EnableViewState="False" OnClientClose="WindowsRainFallNewClose"
                Left="250px" Modal="true" runat="server" Width="300px" Height="400px" Title="Custom Rain Fall"
                NavigateUrl="GFTDonRisk_CustomRainFallNew.aspx" VisibleStatusbar="false" meta:resourcekey="DialogWindow">

    When the parent page is reloaded, the page contained in the RadWindow also reloaded and I don't want that. I use a global script to show a loading bar when the pages are loading and close it when they are loaded. On the reload, the RadWindow don't finish its reload and it's blocking my loading bar (see the attach file : in red, the radwindow page. in yellow, the parent page).

    How can I do to avoid the loading of the radwindow page after the "window.location.reload();" ?
  2. Answer
    Marin Bratanov
    Marin Bratanov avatar
    3899 posts

    Posted 05 Nov 2014 Link to this post


    The short answer is that you cannot avoid the page reload in the RadWindow.

    The window.location.reload() method of the main page will dispose the entire page, including the RadWindow and its content page, so the next time they load, a request has to be made.

    To avoid this, you can consider using AJAX to refresh parts of the main page only, without disposing the RadWindow. If it is not included in the partial page rendering, it will not be disposed and its content page will not be automatically reloaded. You can find a similar example in this demo, which uses the ajaxRequest() method of the RadAjaxManager to update certain controls only. There are also other ways to initiate a partial postback.


    Marin Bratanov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. Pierre-Antoine DOUCHET
    Pierre-Antoine DOUCHET avatar
    11 posts
    Member since:
    Oct 2009

    Posted 05 Nov 2014 in reply to Marin Bratanov Link to this post

    Thanks for your answer. I'll try that.
Back to Top