views:

1342

answers:

4

Guys, I am having an issue with Telerik's RadPanelBar control. I have the Q1 2009 version of the controls. I have the follow ASP.NET code:

<telerik:RadPanelBar Width="297px" ID="RadPanelBar1" runat="server" Skin="Web20" AllowCollapseAllItems="True" ExpandMode="SingleExpandedItem" PersistStateInCookie="True">
    <Items>
            <telerik:RadPanelItem runat="server" Text="Standard Reports" Expanded="True">
                  <ItemTemplate>
                        ... Standard HTML Template code here ...
                  </ItemTemplate>
            </telerik:RadPanelItem>
            <telerik:RadPanelItem runat="server" Expanded="false" Text="NonStandard Reports">
                   <ItemTemplate>
                             <asp:Label runat="server" Text="test"></asp:Label>
                                </ItemTemplate>
                            </telerik:RadPanelItem>
       </Items>
</telerik:RadPanelBar>

Everything works fine, except I cannot expand or collapase the headers. My cursor changes to a hand when I hover over the headers, however nothing happens when I click on the header. Can someone help me out?

Thanks

A: 

Do you have a telerik:RadScriptManager on the page?

ajh1138
+1  A: 

If you set the ItemTemplate of top level items - you will define the content of the item not the collapsible area. To solve the problem define a child item and set its ItemTemplate property instead:

<telerik:RadPanelBar runat="server">
   <Items>
       <telerik:RadPanelItem Text="Standard Reports">
          <Items>
              <telerik:RadPanelItem>
                 <ItemTemplate>
                     ... Standard HTML Template code here ...
                 </ItemTemplate>
              </telerik:RadPanelItem>
          </Items>
       </telerik:RadPanelItem>
   </Items>
</telerik:RadPanelBar>

I hope this helps!

korchev
Perfect. This solved my problem!
icemanind
A: 

Did you try the above method when adding databound controls in the ItemTemplate? So for instance where you have written "... Standard HTML Template code here ..." to put:

<ItemTemplate>
   <asp:Label ID="lblText" runat="server" Text="The index has as ID "></asp:Label>
   <asp:Label ID="lblIndexID" runat="server" Text='<%#Eval("ID") %>'></asp:Label>
</ItemTemplate>

My ItemTemplate is always empty. I'm binding to an ICollection. I can't figure out why this isn't working...

Maarten Louage
A: 

Hi the solution korchev had given is working fine but in this situation , the application is not working in ie 6 and mozilla

sreeraj