Hello,
I have created a simple example, to utilize the loading panel on a RadWindow. On my current apps, when I called EditCancel(), the RadWindow closed properly. But not on this example. I am sure it's probably just some simple setting that I forgot. I just couldn't figure it out which one. Could you help?
Thanks in advance.
Tri
Master Page:
<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<asp:ContentPlaceHolder id="head" runat="server">Header
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
Main Page:
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="PgMain.aspx.vb" Inherits="PgMain" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadCodeBlock ID="rcb1" runat="server">
<script language="javascript" type="text/javascript">
function ShowEditForm(pageUrl, id, iWidth, iHeight) {
var nWindow = window.radopen(pageUrl + ".aspx?id=" + id, "UserListDialog");
nWindow.setSize(iWidth, iHeight);
nWindow.center();
nWindow.modal = true;
nWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Resize + Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close);
nWindow.show();
return false;
}
</script>
</telerik:RadCodeBlock>
<div>
<asp:Button ID="lbn" runat="server" Text="Load Window" OnClientClick="return ShowEditForm('PgWindow', 0, 500, 500);" />
</div>
<telerik:RadWindowManager ID="WinMgr" runat="server" Skin="WebBlue" KeepInScreenBounds="true"
Style="z-index: 7100;">
<Windows>
<telerik:RadWindow ID="UserListDialog" runat="server" Behaviors="Close, Move" Height="300px"
Left="10px" Modal="true" ReloadOnShow="true" Skin="WebBlue" Opacity="100" Title="User List Dialog"
Top="10px" Width="500px" KeepInScreenBounds="true">
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
</asp:Content>
Window Page:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="PgWindow.aspx.vb" Inherits="PgWindow" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadCodeBlock ID="rcb1" runat="server">
<script type="text/javascript">
function GetRadWindow() {
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)
return oWindow;
}
function CancelEdit() {
alert('Should be closing!');
GetRadWindow().Close();
}
</script>
</telerik:RadCodeBlock>
<div>
<asp:Panel ID="pnl" runat="server" Height="400">
Just testing
</asp:Panel>
<asp:Button ID="btnClose" runat="server" Text="Process ..." />
</div>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="WebBlue">
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="btnClose">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="pnl" UpdatePanelCssClass="" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
</form>
</body>
</html>
I have created a simple example, to utilize the loading panel on a RadWindow. On my current apps, when I called EditCancel(), the RadWindow closed properly. But not on this example. I am sure it's probably just some simple setting that I forgot. I just couldn't figure it out which one. Could you help?
Thanks in advance.
Tri
Master Page:
<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<asp:ContentPlaceHolder id="head" runat="server">Header
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
Main Page:
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="PgMain.aspx.vb" Inherits="PgMain" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadCodeBlock ID="rcb1" runat="server">
<script language="javascript" type="text/javascript">
function ShowEditForm(pageUrl, id, iWidth, iHeight) {
var nWindow = window.radopen(pageUrl + ".aspx?id=" + id, "UserListDialog");
nWindow.setSize(iWidth, iHeight);
nWindow.center();
nWindow.modal = true;
nWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Resize + Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close);
nWindow.show();
return false;
}
</script>
</telerik:RadCodeBlock>
<div>
<asp:Button ID="lbn" runat="server" Text="Load Window" OnClientClick="return ShowEditForm('PgWindow', 0, 500, 500);" />
</div>
<telerik:RadWindowManager ID="WinMgr" runat="server" Skin="WebBlue" KeepInScreenBounds="true"
Style="z-index: 7100;">
<Windows>
<telerik:RadWindow ID="UserListDialog" runat="server" Behaviors="Close, Move" Height="300px"
Left="10px" Modal="true" ReloadOnShow="true" Skin="WebBlue" Opacity="100" Title="User List Dialog"
Top="10px" Width="500px" KeepInScreenBounds="true">
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
</asp:Content>
Window Page:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="PgWindow.aspx.vb" Inherits="PgWindow" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadCodeBlock ID="rcb1" runat="server">
<script type="text/javascript">
function GetRadWindow() {
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)
return oWindow;
}
function CancelEdit() {
alert('Should be closing!');
GetRadWindow().Close();
}
</script>
</telerik:RadCodeBlock>
<div>
<asp:Panel ID="pnl" runat="server" Height="400">
Just testing
</asp:Panel>
<asp:Button ID="btnClose" runat="server" Text="Process ..." />
</div>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="WebBlue">
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="btnClose">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="pnl" UpdatePanelCssClass="" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
</form>
</body>
</html>