RadWindow Closes on Parent Ajax Call

3 posts, 0 answers
  1. Tamir
    Tamir avatar
    4 posts
    Member since:
    May 2007

    Posted 12 Aug 2013 Link to this post


    Hi,

     I have a master page with an update panel. The update panel is refreshed periodically by a timer.
    On a child page I have RadWindowManger and I open a RadWindow of that page.

    When the an Ajax call is made to update the update panel on the master page the RadWindow closes. I tested and verified that the call is an Ajax call on the master page and not a full postback.

    This is the update panel on master page:
    <asp:UpdatePanel runat="server" ID="pnlWorldTime" UpdateMode="Conditional" >
       <ContentTemplate>
           <asp:Timer runat="server" ID="tWorldClock" Interval="10000" OnTick="tWorldClock_Tick" />
           <asp:Literal ID="ltrWordTime" runat="server"></asp:Literal>
           <asp:HiddenField ID="hfRadWindowOpen" runat="server" />
       </ContentTemplate>
    </asp:UpdatePanel>

    This is the RadWindowManger on the child page:

    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Modal="true" VisibleStatusbar="false"
        AutoSize="true" ShowContentDuringLoad="false" Behaviors="Resize, move, Close" Skin="DD"
        EnableEmbeddedSkins="false" EnableTheming="true"  DestroyOnClose="true" OnClientClose="OnClientClose">
        <Windows>
            <telerik:RadWindow ID="RadWindow1" runat="server"  />
        </Windows>
        <AlertTemplate>
            <div class="alert-icon"></div>
            <div class="rwDialogPopup radalert">
                <div class="rwDialogText">
                    {1}
                </div>
                <div class="alert-button">
                    <a onclick="$find('{0}').close();" class="rwPopupButton" href="javascript:void(0);">
                        <span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[OK]##</span> </span>
                    </a>
                </div>
            </div>
        </AlertTemplate>
        <ConfirmTemplate>
            <div class="rwDialogPopup radconfirm">         
                <div class="rwDialogText">
                    {1}        
                </div>                     
                <div class="confirm-buttons">
                    <a onclick="$find('{0}').close(true);" class="rwPopupButton" href="javascript:void(0);">
                        <span class="rwOuterSpan"><span class="rwInnerSpan"><img src="../images/buttons/delete_room.png" alt="" /></span></span>
                    </a>
                    <a onclick="$find('{0}').close(false);" class="rwPopupButton" href="javascript:void(0);">
                        <span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[Cancel]##</span></span>
                    </a>
                </div>
            </div>
        </ConfirmTemplate>
    </telerik:RadWindowManager>


    Any ideas?

    Thanks

    Tamir
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3599 posts

    Posted 13 Aug 2013 Link to this post

    Hi Tamir,

    The fact that the postback is partial does not mean that the RadWindowManager cannot be disposed with it. Whether this happens depends on the AJAX configuration on the page. What I suspect is happening is that there is an update panel with UpdateMode=Always (the default value) or an AJAX setting from a RadAjaxManager/RadAjaxManagerProxy that covers an ASP:Panel whose child the RadWindowManager is.

    Ultimately, you need to make sure the RadWindows and RadWindowManager are not included in the postback, which will ensure that they are not disposed with it (i.e. closed).


    Regards,
    Marin Bratanov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tamir
    Tamir avatar
    4 posts
    Member since:
    May 2007

    Posted 13 Aug 2013 Link to this post

     
    Thanks for the quick response Marin.

    Your advise put me on the right track. It was another updatepanel on the master page that was causing the issue. Setting it to UpdateMode="Conditional" seems to fix the issue even though the RadWindow or any other rad controls are not inside any update panel.
Back to Top