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
Launch method in code behind of AlertGroupEditor.ascx.vb
Calling the Launch method from the AlertGroupEditorLauncher.ascx.vb
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 String, ByVal groupEmailAddressIDs As ArrayList, ByVal groupEmailGroupIDs As ArrayList, ByVal groupFaxNumberIDs As ArrayList) LoadAlertGroup(groupLauncherID, groupEmailAddressIDs, groupEmailGroupIDs, groupFaxNumberIDs) 'modalEditor.Show() winEditorPopup.VisibleOnPageLoad = True lstShowType.SelectedValue = 0 cbxGroupsOnly.Checked = False End Sub
Calling the Launch method from the AlertGroupEditorLauncher.ascx.vb
groupEditor.Launch(ID, AlertGroup.EmailAddressIDs, AlertGroup.EmailGroupIDs, AlertGroup.FaxNumberIDs)