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

Issue loading RadWindow inside UpdatePanel

1 Answer 141 Views
Window
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 10 Jul 2012, 06:57 PM
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">
    <ContentTemplate>
<!-- Insert Content Here -->
    </ContentTemplate>
</telerik:RadWindow>

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)
            LoadAlertGroup(groupLauncherIDgroupEmailAddressIDsgroupEmailGroupIDsgroupFaxNumberIDs)
            'modalEditor.Show()
            winEditorPopup.VisibleOnPageLoad = True
            lstShowType.SelectedValue = 0
            cbxGroupsOnly.Checked = False
        End Sub

Calling the Launch method from the AlertGroupEditorLauncher.ascx.vb
groupEditor.Launch(IDAlertGroup.EmailAddressIDsAlertGroup.EmailGroupIDsAlertGroup.FaxNumberIDs)

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 Jul 2012, 05:16 AM
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.

Thanks,
Princy.
Tags
Window
Asked by
John
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or