This is a migrated thread and some comments may be shown as answers.

Talk to each other

1 Answer 68 Views
Dock
This is a migrated thread and some comments may be shown as answers.
James Keller
Top achievements
Rank 1
James Keller asked on 16 Aug 2008, 01:37 AM
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.

1 Answer, 1 is accepted

Sort by
0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 18 Aug 2008, 02:37 PM
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;

Tags
Dock
Asked by
James Keller
Top achievements
Rank 1
Answers by
Obi-Wan Kenobi
Top achievements
Rank 1
Share this question
or