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

PanelBar content

2 Answers 63 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 16 Oct 2008, 05:32 PM
Hi

I would like to use the panelbar control to organise a number of panes in a similar way to Outlooks left hand organiser. However, I would like to be able to insert other controls in each of the panes. This appears to work when I insert the controls within the <ItemTemplate> tag. The problem is that I'm then not able to then close the bar. I've created a simple example of what I mean here below. You'll see that the first pane in the panelbar is not able to be closed.

Any thoughts appreciated.

Michael


    <telerik:RadPanelBar ID="RadPanelBar1" Runat="server" Skin="Outlook" Height="321px">  
        <CollapseAnimation Type="None" Duration="100"></CollapseAnimation> 
 
        <Items> 
            <telerik:RadPanelItem runat="server" Text="Root RadPanelItem1">  
                <ItemTemplate> 
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> 
                </ItemTemplate> 
            </telerik:RadPanelItem> 
            <telerik:RadPanelItem runat="server" Text="Root RadPanelItem2">  
                <Items> 
                    <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 1">  
                    </telerik:RadPanelItem> 
                    <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 2">  
                    </telerik:RadPanelItem> 
                    <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 3">  
                    </telerik:RadPanelItem> 
                </Items> 
            </telerik:RadPanelItem> 
            <telerik:RadPanelItem runat="server" Text="Root RadPanelItem3">  
                <Items> 
                    <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 1">  
                    </telerik:RadPanelItem> 
                    <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 2">  
                    </telerik:RadPanelItem> 
                    <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 3">  
                    </telerik:RadPanelItem> 
                </Items> 
            </telerik:RadPanelItem> 
        </Items> 
 
        <ExpandAnimation Type="None" Duration="100"></ExpandAnimation> 
    </telerik:RadPanelBar> 
 

2 Answers, 1 is accepted

Sort by
0
Ed
Top achievements
Rank 1
answered on 18 Oct 2008, 09:07 AM
Hi there,

You are missing the following lines from your template item (sorry for the loss of colour etc., I can't seem to copy and paste the code in Firefox):

    <telerik:RadPanelBar ID="RadPanelBar1" Runat="server" Skin="Outlook" Height="321px">  
        <CollapseAnimation Type="None" Duration="100"></CollapseAnimation>
 
        <Items>
            <telerik:RadPanelItem runat="server" Text="Root RadPanelItem1">  
            <Items>
            <telerik:RadPanelItem>

                <ItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                </ItemTemplate>
            </telerik:RadPanelItem>
            </Items>

            </telerik:RadPanelItem>
            <telerik:RadPanelItem runat="server" Text="Root RadPanelItem2">
            ...

Cheers,

Ed

0
Michael
Top achievements
Rank 1
answered on 22 Oct 2008, 11:56 AM
Works great now.

Thanks, Ed

Tags
PanelBar
Asked by
Michael
Top achievements
Rank 1
Answers by
Ed
Top achievements
Rank 1
Michael
Top achievements
Rank 1
Share this question
or