Cannot access radtextbox inside radDock from child

464 views Asked by At

Here is my radTextBox inside radDock , I set this in my ParentPage

   <telerik:RadDockZone ID="ZoneDescription" runat="server" BorderStyle="None" Width="600px">
                <telerik:RadDock ID="DockDescription" runat="server" EnableDrag="false" EnableRoundedCorners="true"
                    Title="Itinerary Description" Width="600px" Skin="Vista" DefaultCommands="None">
                    <ContentTemplate>
                        <div style="padding-top: 5px;">
                            <telerik:RadTextBox ID="rtxtDescription" runat="server" Width="100%" TextMode="MultiLine">
                            </telerik:RadTextBox>
                        </div>
                    </ContentTemplate>
                </telerik:RadDock>
            </telerik:RadDockZone>

From my child Page , I get rtxtDescription's text value likes ,

 (((this.Parent.FindControl("ZoneDescription") as RadDockZone).  
 FindControl("DockDescription") as RadDock).  
 FindControl("rtxtDescription") as RadTextBox).Text;

and

(this.Parent.FindControl("rtxtDescription") as RadTextBox).Text;

But both doesn't work , cannot access rtxtDescription .
How can I solve it ? Thanks in advance :)

1

There are 1 answers

0
Jayesh Goyani On

Please try with the below code snippet.

((ZoneDescription.FindControl("DockDescription") as RadDock).ContentContainer.FindControl("rtxtDescription") as RadTextBox).Text = "Your text here";