Hi,
I'm trying to get the ClientID (from within a master page) of a RadPane which is part of a content page .
Default.Master
Default.aspx
<%= this.SplitterPlaceholder.FindControl("LeftContentPane").ClientID %> returns (SplitterPlaceholder_LeftContentPane), but the page does not contain an element with this id and therefore $find() returns null and setVarSize() fails.
I also tried to use a public property in Default.aspx.cs to access the ClientID from Default.Master, but the result was the same.
I know that it can be tricky to access controls in content pages, but afaik it should work this way. Did I overlook something or is this scenario not supported by RadControls/ASP.NET?
Best Regards
I'm trying to get the ClientID (from within a master page) of a RadPane which is part of a content page .
Default.Master
//... <script type="text/javascript"> function pageLoad() { var dataPane = $find('<%= this.SplitterPlaceholder.FindControl("LeftContentPane").ClientID %>'); dataPane.setVarSize($(window).width()); } </script> //... <telerik:RadSplitter ID="RadSplitter1" Height="100%" runat="server" ClientIDMode="AutoID"> <telerik:RadPane ID="ContentPane" runat="server"> <telerik:RadSplitter ID="Radsplitter2" runat="server" Orientation="Vertical"> <telerik:RadPane ID="RadPane1" runat="server" ContentUrl="Data.aspx" /> <asp:ContentPlaceholder ID="SplitterPlaceholder" runat="server" /> <telerik:RadSplitBar ID="ContentSplitBar" runat="server" /> <telerik:RadPane ID="RightContentPane" ContentUrl="Map.aspx" runat="server"> </telerik:RadPane> </telerik:RadSplitter> </telerik:RadPane> <telerik:RadSplitBar ID="RadSplitBar2" runat="server" /> <telerik:RadPane ID="BottomPane" runat="server"> </telerik:RadPane> </telerik:RadSplitter> //..Default.aspx
<%@ Page Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="UIProject.Default" %> <asp:Content id="Pane" ContentPlaceholderID="SplitterPlaceholder" runat="server"> <telerik:RadPane ID="LeftContentPane" runat="server" ContentUrl="Data.aspx" /> </asp:Content><%= this.SplitterPlaceholder.FindControl("LeftContentPane").ClientID %> returns (SplitterPlaceholder_LeftContentPane), but the page does not contain an element with this id and therefore $find() returns null and setVarSize() fails.
I also tried to use a public property in Default.aspx.cs to access the ClientID from Default.Master, but the result was the same.
I know that it can be tricky to access controls in content pages, but afaik it should work this way. Did I overlook something or is this scenario not supported by RadControls/ASP.NET?
Best Regards