Talk to each other

2 posts, 0 answers
  1. James Keller
    James Keller avatar
    6 posts
    Member since:
    Jul 2008

    Posted 15 Aug 2008 Link to this post

    I am having a problem getting Rad doc windows talking to each other.  I want to be able to have 4+ doc windows (Consisting of .ascx controls) on the screen.  With those 4 .ascx dock controls I want to be able to fire custom events that other windows subscribe to.  For an example I have a drop down in one Dock window that calls a Bind for a Grid in another Dock Window. I seem to be having a problem finding the controls.  I've used "this.Parent.FindControl" and other variations of this code but to no avail I cannot find the other .ascx controls within the other doc windows.  Please help me.
  2. Obi-Wan Kenobi
    Obi-Wan Kenobi  avatar
    460 posts
    Member since:
    Aug 2007

    Posted 18 Aug 2008 Link to this post

    If you have a declaration like the following one:
    <body> 
        <form id="form1" runat="server">  
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> 
        <div> 
        <telerik:RadDockLayout ID="RadDockLayout1" runat="server" Skin="Gray">  
            <telerik:RadDockZone ID="RadDockZone1" runat="server">  
                <telerik:RadDock ID="RadDock1" runat="server" Title="RadDock1">  
                <ContentTemplate> 
                   <uc1:WebUserControl ID="WebUserControl1" runat="server" /> 
                </ContentTemplate> 
                </telerik:RadDock> 
            </telerik:RadDockZone> 
        </telerik:RadDockLayout> 
           
          
        </div> 
        </form> 
    </body> 
    You can get a TextBox(with id: TextBox1) which is in the WebUserControl1 with the following code:

    UserControl

    uc1 = (UserControl)RadDock1.ContentContainer.FindControl("WebUserControl1");

    TextBox tb1 = ((TextBox)uc1.FindControl("TextBox1")).Text;

Back to Top