Hello,
I have the following situation:
Site.Master:
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" EnablePartialRendering="true">
<Scripts>
<%--Framework scripts--%>
<asp:ScriptReference Name="MsAjaxBundle" />
................................................................
</Scripts>
</asp:ScriptManager>
<telerik:RadWindowManager ID="RadWindowManagerL" runat="server" AnimationDuration="3000" EnableViewState="false"> </telerik:RadWindowManager>
<asp:UpdatePanel ID="UP" runat="server">
<ContentTemplate>
<asp:ContentPlaceHolder runat="server" ID="MainContent" />
</ContentTemplate>
</asp:UpdatePanel>
somename.aspx:
..............................
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server"> <%-- this is the content that is placed in the UpdatePanel -->
........................................
<script type="text/javascript">
function show(nameRadWindow) {
var name= String(nameRadWindow);
var manager = GetRadWindowManager();
var window = manager.getWindowByName(name);
window.show();
window.focus();
}
</script>
</asp:Content>
somename.aspx.vb:
Public Class somename
Inherits System.Web.UI.Page
Dim IsFirstTime As Boolean = True
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If (Not IsPostBack) And IsFirstTime = True Then
createWin()
IsFirstTime = False
End if
Public Sub createWin()
Dim numFer As Integer = DirectCast(Me.Master.FindControl("RadWindowManagerL"), RadWindowManager).Windows.Count()
Try
If numFer <> 0 Then
DirectCast(Me.Master.FindControl("RadWindowManagerL"), RadWindowManager).Windows.Clear()
End If
Catch ex As Exception
End Try
Dim arrayWindow(3, 4) As String
arrayWindow(0, 0) = "radWindowOne"
arrayWindow(1, 0) = "windowOne.aspx"
arrayWindow(2, 0) = "Window One Title" '
arrayWindow(3, 0) = "divname
"
arrayWindow(0, 1) = "radWIndowTwo"
arrayWindow(1, 1) = "windowTwo.aspx"
arrayWindow(2, 1) = "Window two Title"
arrayWindow(3, 1) = "divname"
"
arrayWindow(0, 2) = "radWindowThree"
arrayWindow(1, 2) = "windowThree.aspx"
arrayWindow(2, 2) = "Window Three Title"
arrayWindow(3, 2) = "divname"
"
arrayWindow(0, 3) = "radWindowFour"
arrayWindow(1, 3) = "windowFour.aspx"
arrayWindow(2, 3) = "Window Four Title"
arrayWindow(3, 3) = "divname"
"
arrayWindow(0, 4) = "radWindowFive"
arrayWindow(1, 4) = "windowFive.aspx"
arrayWindow(2, 4) = "Window Five Title"
arrayWindow(3, 4) = "divname"
For i As Integer = 0 To 4
Dim window As New Telerik.Web.UI.RadWindow()
With window
.ID = arrayWindow(0, i)
.NavigateUrl = arrayWindow(1, i)
.Title = arrayWindow(2, i)
.RestrictionZoneID = arrayWindow(3, i)
.EnableViewState = False
.VisibleOnPageLoad = False
.ReloadOnShow = False
.ShowContentDuringLoad = False
.DestroyOnClose = False
.Behaviors = WindowBehaviors.Move Or WindowBehaviors.Close Or WindowBehaviors.Resize
.VisibleStatusbar = False
.Modal = True
.Skin = "Metro"
.EnableEmbeddedSkins = False
.Height = 440
.Width = 750
End With
DirectCast(Me.Master.FindControl("RadWindowManagerlocatii"), RadWindowManager).Windows.Add(window)
' All the windows are succesfully added
Next
End Sub
Protected Sub btneditc_Click(sender As Object, e As EventArgs) Handles btneditc.Click
'ScriptManager.RegisterStartupScript(Me, Me.GetType(), "openWnd", "show('radWindowOne'); return false;", True)
'ScriptManager.RegisterStartupScript(Me, Me.GetType(), "openWnd", "show('radWindowFive'); return false;", True)
' If i try to open Window one, all things are ok the window is opened and doesn`t disappear
' if I try to open Window five , the window appears for 1 sec and disappears
End Sub
The code for WindowOne.aspx/vb and WindowFive.aspx/vb is the same
I tried to call the JS function show() from aspx too : OnClientClick="show('nameofthewindow'); return false;" but doesn t work :( and I can't use RadScriptManager and AJAX because in somename.aspx a have a lot of UI oject (radgrids, etc...)
I have the following situation:
Site.Master:
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" EnablePartialRendering="true">
<Scripts>
<%--Framework scripts--%>
<asp:ScriptReference Name="MsAjaxBundle" />
................................................................
</Scripts>
</asp:ScriptManager>
<telerik:RadWindowManager ID="RadWindowManagerL" runat="server" AnimationDuration="3000" EnableViewState="false"> </telerik:RadWindowManager>
<asp:UpdatePanel ID="UP" runat="server">
<ContentTemplate>
<asp:ContentPlaceHolder runat="server" ID="MainContent" />
</ContentTemplate>
</asp:UpdatePanel>
somename.aspx:
..............................
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server"> <%-- this is the content that is placed in the UpdatePanel -->
.........................
<asp:Button ID="btneditc" runat="server" Width="40px" Text="Edit" Font-Size="Small" Height="28px" BorderColor="#043C77" ForeColor="#043C77" />........................................
<script type="text/javascript">
function show(nameRadWindow) {
var name= String(nameRadWindow);
var manager = GetRadWindowManager();
var window = manager.getWindowByName(name);
window.show();
window.focus();
}
</script>
</asp:Content>
somename.aspx.vb:
Public Class somename
Inherits System.Web.UI.Page
Dim IsFirstTime As Boolean = True
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If (Not IsPostBack) And IsFirstTime = True Then
createWin()
IsFirstTime = False
End if
Public Sub createWin()
Dim numFer As Integer = DirectCast(Me.Master.FindControl("RadWindowManagerL"), RadWindowManager).Windows.Count()
Try
If numFer <> 0 Then
DirectCast(Me.Master.FindControl("RadWindowManagerL"), RadWindowManager).Windows.Clear()
End If
Catch ex As Exception
End Try
Dim arrayWindow(3, 4) As String
arrayWindow(0, 0) = "radWindowOne"
arrayWindow(1, 0) = "windowOne.aspx"
arrayWindow(2, 0) = "Window One Title" '
arrayWindow(3, 0) = "divname
"
arrayWindow(0, 1) = "radWIndowTwo"
arrayWindow(1, 1) = "windowTwo.aspx"
arrayWindow(2, 1) = "Window two Title"
arrayWindow(3, 1) = "divname"
"
arrayWindow(0, 2) = "radWindowThree"
arrayWindow(1, 2) = "windowThree.aspx"
arrayWindow(2, 2) = "Window Three Title"
arrayWindow(3, 2) = "divname"
"
arrayWindow(0, 3) = "radWindowFour"
arrayWindow(1, 3) = "windowFour.aspx"
arrayWindow(2, 3) = "Window Four Title"
arrayWindow(3, 3) = "divname"
"
arrayWindow(0, 4) = "radWindowFive"
arrayWindow(1, 4) = "windowFive.aspx"
arrayWindow(2, 4) = "Window Five Title"
arrayWindow(3, 4) = "divname"
For i As Integer = 0 To 4
Dim window As New Telerik.Web.UI.RadWindow()
With window
.ID = arrayWindow(0, i)
.NavigateUrl = arrayWindow(1, i)
.Title = arrayWindow(2, i)
.RestrictionZoneID = arrayWindow(3, i)
.EnableViewState = False
.VisibleOnPageLoad = False
.ReloadOnShow = False
.ShowContentDuringLoad = False
.DestroyOnClose = False
.Behaviors = WindowBehaviors.Move Or WindowBehaviors.Close Or WindowBehaviors.Resize
.VisibleStatusbar = False
.Modal = True
.Skin = "Metro"
.EnableEmbeddedSkins = False
.Height = 440
.Width = 750
End With
DirectCast(Me.Master.FindControl("RadWindowManagerlocatii"), RadWindowManager).Windows.Add(window)
' All the windows are succesfully added
Next
End Sub
Protected Sub btneditc_Click(sender As Object, e As EventArgs) Handles btneditc.Click
'ScriptManager.RegisterStartupScript(Me, Me.GetType(), "openWnd", "show('radWindowOne'); return false;", True)
'ScriptManager.RegisterStartupScript(Me, Me.GetType(), "openWnd", "show('radWindowFive'); return false;", True)
' If i try to open Window one, all things are ok the window is opened and doesn`t disappear
' if I try to open Window five , the window appears for 1 sec and disappears
End Sub
The code for WindowOne.aspx/vb and WindowFive.aspx/vb is the same
I tried to call the JS function show() from aspx too : OnClientClick="show('nameofthewindow'); return false;" but doesn t work :( and I can't use RadScriptManager and AJAX because in somename.aspx a have a lot of UI oject (radgrids, etc...)