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

RadWindow not opening from CodeBehind

1 Answer 114 Views
Window
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 10 May 2012, 09:26 PM
I am attempting to show a radWindow based on a combobox selection, and nothing is happening.

I have a radWindowManager on the page:

<telerik:RadWindowManager ID="RadWindowManager1" runat="server"
        EnableViewState="False">
    </telerik:RadWindowManager>

and the code behind is simply:

Protected Sub list_State_SelectedIndexChanged(sender As Object, e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles list_State.SelectedIndexChanged
 
        If list_State.SelectedValue = "NV" Then
            Dim url As String = String.Format("nevada-alert.aspx")
            Dim NewWindow As RadWindow = New RadWindow()
            NewWindow.ID = "win_ServiceState"
            NewWindow.Title = "Nevada is currently offline."
            NewWindow.Height = 330
            NewWindow.Width = 420
            NewWindow.ReloadOnShow = True
            NewWindow.Modal = True
            NewWindow.ShowContentDuringLoad = False
            NewWindow.KeepInScreenBounds = True
            NewWindow.VisibleOnPageLoad = True
            NewWindow.NavigateUrl = url
            RadWindowManager1.Windows.Add(NewWindow)
        End If
 
    End Sub

Shouldn't that be sufficient in launching the window?

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 14 May 2012, 02:07 PM
Hello Shawn,

Are you using AJAX in this page? It seems like the combo box performs an AJAX request that does not include the RadWindowManager in the response and thus the new RadWindow is not received by the browser. You can easily confirm this by either removing all asp update panels on the page, or setting the EnableAJAX property of the RadAjaxManager/panel to false, or by wrapping the window manager in an update panel with updateMode set to Conditional.


Kind regards,
Marin
the Telerik team
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 their blog feed now.
Tags
Window
Asked by
Shawn
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or