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

Cannot get Item Expand to work in RadPanel Templates Demo

1 Answer 43 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 24 Mar 2011, 05:38 PM
I am using a combination of 2 demos under your RadPanel demos.  I am using the Templates and then I am using the Accessing Nested Controls demo within it.  

http://demos.telerik.com/aspnet-ajax/panelbar/examples/functionality/templates/defaultcs.aspx

http://demos.telerik.com/aspnet-ajax/panelbar/examples/applicationscenarios/accessingnestedcontrols/defaultcs.aspx

I cannot set the RadPanel.Items[].Expanded property in code behind or inline for the Template demo.  I am trying to set the inital panel to be expanded.  I realize that the Panel that I am trying to wowk with has a HeaderTemplate and a ContentTemplate, and using a radMenu within the HeaderTemplate, and that this may be part of the problem, according to this issue on the forum.
http://www.telerik.com/community/forums/aspnet-ajax/panelbar/can-t-collapse-or-expand-panel-bar-w-itemtemplate.aspx

I have tried what this article suggests but this breaks everything.

I appreciate your help.

1 Answer, 1 is accepted

Sort by
0
Accepted
Helen
Telerik team
answered on 29 Mar 2011, 01:21 PM
Hi Robert,

Thank you for the report. Actually the problem appears when RadPanelBar has both HeaderTemplate and ItemTemplate, and the expanded item has no text.
You may workaround it if you set text for this item:

<telerik:RadPanelItem Expanded="true" Text="testing">
<HeaderTemplate>
    <div style="float: left; padding-top: 1px; z-index: 2800;">
    <telerik:RadMenu ID="RadMenu1" runat="server" OnClientItemClicked="onItemClicked"
        Skin="Forest" Style="z-index: 2900">
        <Items>
        <telerik:RadMenuItem Text="Books" Selected="true">
        </telerik:RadMenuItem>
        <telerik:RadMenuItem Text="Cameras">
        </telerik:RadMenuItem>
        <telerik:RadMenuItem Text="Apparel">
        </telerik:RadMenuItem>
        </Items>
    </telerik:RadMenu>
............................................

Hope it helps.

Greetings,
Helen
the Telerik team
Tags
PanelBar
Asked by
Robert
Top achievements
Rank 1
Answers by
Helen
Telerik team
Share this question
or