We have a page that contains a RadDockLayout with multiple RadDocks. Some of these RadDocks don't apply to certain users under certain conditions so we have code that may set Visible=false on some of the docks. This code was fine in the Q3 2008 version of the controls but since we've upgraded to the Q1 2009 version (2009.1.402.35) this code now produces a Javascript "'undefined' is null or not an object" runtime error when the page loads in the browser.
Below is a basic example of our layout and it exhibits the problem I just mentioned.
Visiblity is set to false for RadDock2 in the code behind (see below).
Is there a workaround for this problem?
Below is a basic example of our layout and it exhibits the problem I just mentioned.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestHiddenDock._Default" %> |
<%@ 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"> |
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> |
<telerik:RadDockLayout ID="RadDockLayout1" runat="server"> |
<telerik:RadDockZone ID="RadDockZone1" runat="server" Width="900px"> |
<telerik:RadDock ID="RadDock1" runat="server" Width="900px" Title="Visible"> |
<ContentTemplate>Visible by default</ContentTemplate> |
</telerik:RadDock> |
<telerik:RadDock ID="RadDock2" runat="server" Width="900px" Title="Invisible by Default"> |
<ContentTemplate>Invisible by default.</ContentTemplate> |
</telerik:RadDock> |
</telerik:RadDockZone> |
</telerik:RadDockLayout> |
</form> |
</body> |
</html> |
Visiblity is set to false for RadDock2 in the code behind (see below).
using System; |
namespace TestHiddenDock |
{ |
public partial class _Default : System.Web.UI.Page |
{ |
protected void Page_Load(object sender, EventArgs e) |
{ |
if (!Page.IsPostBack) |
RadDock2.Visible = false; |
} |
} |
} |
Is there a workaround for this problem?