Issue loading RadWindow inside UpdatePanel

2 posts, 0 answers
  1. John
    John avatar
    5 posts
    Member since:
    Jun 2012

    Posted 10 Jul 2012 Link to this post

    I'm currently going through our application and replacing all instances of ajaxtoolkit popups with Telerik popups and I've run into an issue.

    I have a setup page that has an updatepanel on it and within that panel is a button. This button then calls a control. Inside this control is a method that calls a Launch method in the code behind of another control that contains my popup. It's a strange way of going about it I know but there were reasons for it. Anyways, the code behind of my control containing the popup had the .show() method for the ajaxtoolkit popup. I need to replicate the .show() functionality in the codebehind and make it work inside this updatepanel.

    The reason for me being clear about the updatepanel is that on another page that doesn't contain an updatepanel and calls this same control I can get it to work by simply replacing the .show() line with a visibleOnPageLoad = true for the radwindow, however inside of an updatepanel this doesn't work.....umm why?

    Window code in ascx file of my control AlertGroupEditor.ascx
    <%--<ajaxToolkit:ModalPopupExtender ID="modalEditor" BackgroundCssClass="modalBackground" PopupControlID="pnlEditorPopup" TargetControlID="mpLauncher" runat="server"></ajaxToolkit:ModalPopupExtender>--%>
    <telerik:RadWindow ID="winEditorPopup" Modal="true" runat="server" VisibleStatusbar="true" Title="Edit Alert Group" AutoSize="true" Behaviors="None">
    <!-- Insert Content Here -->

    Launch method in code behind of AlertGroupEditor.ascx.vb
    Public Sub Launch(ByVal groupLauncherID As StringByVal groupEmailAddressIDs As ArrayListByVal groupEmailGroupIDs As ArrayListByVal groupFaxNumberIDs As ArrayList)
                winEditorPopup.VisibleOnPageLoad = True
                lstShowType.SelectedValue = 0
                cbxGroupsOnly.Checked = False
            End Sub

    Calling the Launch method from the AlertGroupEditorLauncher.ascx.vb
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 11 Jul 2012 Link to this post

    Hi John,

    Generally placing the RadWindow in an update panel is not recommended, because the rendered HTML is moved from its original location in the markup. This will most often result in the expected functionality simply not working. Please take a look into this for more information.

    Hope this helps.

Back to Top