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

RadWindow Closes on Parent Ajax Call

2 Answers 45 Views
Window
This is a migrated thread and some comments may be shown as answers.
Tamir
Top achievements
Rank 1
Tamir asked on 12 Aug 2013, 11:59 PM

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 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 13 Aug 2013, 09:23 AM
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.
0
Tamir
Top achievements
Rank 1
answered on 13 Aug 2013, 02:13 PM
 
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.
Tags
Window
Asked by
Tamir
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Tamir
Top achievements
Rank 1
Share this question
or