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

Items in the PanelBar

1 Answer 71 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Josh
Top achievements
Rank 1
Josh asked on 28 Jul 2008, 08:52 PM
Lets say I have a panel bar defined as the following:

<telerik:RadPanelBar
   ID="RadPanelBar1"
   runat="server"
   Skin="Outlook">
 <Items>
  <telerik:RadPanelItem runat="server" Text="Calendar">
     <Items>
       <telerik:RadPanelItem runat="server">
         <ItemTemplate>
           <telerik:RadCalendar ID="RadCalendar1" runat="server" Skin="Outlook" />
         </ItemTemplate>
       </telerik:RadPanelItem>
     </Items>
  </telerik:RadPanelItem>
 </Items>
</telerik:RadPanelBar>

Is it possible to gain access to RadCalendar1 from server side code?

1 Answer, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 29 Jul 2008, 08:03 AM
Hi Josh,

Try the following approach:

C#
RadCalendar calendar = (RadCalendar )RadPanelBar1.Items[0].Items[0].FindControl("RadCalendar1"); 

VB
Dim calendar As RadCalendar = CType(RadPanelBar1.Items(0).Items(0).FindControl("RadCalendar1"),RadCalendar ) 

Best wishes,
Rosi
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
PanelBar
Asked by
Josh
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Share this question
or