Hi,
I use a dock with a set of custom commands and I use the radconfirm function on one of the command. When calling dock.set_close(true) in the callback of radconfirm the dock is closed in the browser but when I make a post back, the dock is not closed on the server. If i don't use a callback everything is fine.
Here is a test page with this scenario:
Docks.aspx:
Docks.aspx.cs:
When I closed the dock and click the button the Closed property is still false. If the js function is changed to this:
everything is ok. What I want is that the Closed property is true even if I use a callback. Any help would be appreciated.
Thank you,
Ivan Pelovski
I use a dock with a set of custom commands and I use the radconfirm function on one of the command. When calling dock.set_close(true) in the callback of radconfirm the dock is closed in the browser but when I make a post back, the dock is not closed on the server. If i don't use a callback everything is fine.
Here is a test page with this scenario:
Docks.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Docks.aspx.cs" Inherits="Docks" %> |
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
<!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>Untitled Page</title> |
</head> |
<body> |
<form id="form1" runat="server"> |
<div> |
<script type="text/javascript"> |
function closeDock(dock, args){ |
setTimeout( function(){ dock.set_closed(true);}, 100); |
} |
</script> |
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> |
<telerik:RadDock ID="dock1" runat="server"> |
<Commands> |
<telerik:DockCommand Name="close" Text="close" OnClientCommand="closeDock" /> |
</Commands> |
</telerik:RadDock> |
<br /> |
<br /> |
<br /> |
<br /> |
<asp:Button ID="btn1" runat="server" Text="Post back"/> |
<asp:Label ID="result" runat="server"></asp:Label> |
</div> |
</form> |
</body> |
</html> |
Docks.aspx.cs:
using System; |
public partial class Docks : System.Web.UI.Page |
{ |
protected void Page_Load(object sender, EventArgs e) |
{ |
result.Text = string.Empty; |
btn1.Click += new EventHandler(btn1_Click); |
} |
void btn1_Click(object sender, EventArgs e) |
{ |
result.Text = dock1.Closed.ToString(); |
} |
} |
When I closed the dock and click the button the Closed property is still false. If the js function is changed to this:
function closeDock(dock, args){ |
dock.set_closed(true); |
} |
everything is ok. What I want is that the Closed property is true even if I use a callback. Any help would be appreciated.
Thank you,
Ivan Pelovski