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

How to find dynamically added Control in RadPanelBar

1 Answer 72 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Lubomir
Top achievements
Rank 1
Lubomir asked on 08 Aug 2012, 11:17 AM
This is my source code:

telerik:RadPanelBar runat="server" ID="RadPanelBarProperties" Width="100%" Skin="Default" ExpandMode="MultipleExpandedItems" Height="190px">
    <Items>
        <telerik:RadPanelItem Expanded="True" Text="Desciprtion" runat="server" Selected="true">
            <Items>
                <telerik:RadPanelItem Value="Description" runat="server">
                    <ItemTemplate>
                        <div style="text-align: center;">
                            <asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine"></asp:TextBox>
                        </div>
                    </ItemTemplate>
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelItem>
    </Items>
</telerik:RadPanelBar>

and I added from codebehind new RadPanelItem(this is part of code not all :) )
RadPanelItem firstStep = new RadPanelItem("NewGenerated");
RadPanelBarProperties.Items.Add(firstStep);
 
RadPanelItem secondStep = new RadPanelItem();
secondStep.Value = "SomeValue"
firstStep.Items.Add(secondStep);
 
Label lblProperty = new Label();
lblProperty.Text = "Test";
secondStep.Controls.Add(lblProperty);

after this how can i  find this label(or may be TextBox) in code behind, because if is Textbox i want to catch textbox.Text value.

1 Answer, 1 is accepted

Sort by
0
Helen
Telerik team
answered on 08 Aug 2012, 11:56 AM
Hello,

Probably you will find helpful the following help article:

http://www.telerik.com/help/aspnet-ajax/panelbar-templates-accessing-controls.html

Regards,
Helen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
PanelBar
Asked by
Lubomir
Top achievements
Rank 1
Answers by
Helen
Telerik team
Share this question
or