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

I was choice expandmode="SingleExpandedItem" but i also can see more Items can be expand

2 Answers 69 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
binbin
Top achievements
Rank 1
binbin asked on 19 Aug 2008, 08:50 AM

That is my oode. first  we can see just one item is expand. now you can click "start"
then click "contentmanager"   we can see two items are expand.
How can i  fix? I was try to add click event, but i can't collapse the last expandItem
 <telerik:radpanelbar id="RadPanelBar1"  runat="server" 
                    width="180px" skin="Web20" enableembeddedskins="False"   
                    expandmode="SingleExpandedItem">  
                    <CollapseAnimation Type="None" Duration="100"></CollapseAnimation> 
                    <Items> 
                        <telerik:RadPanelItem Text="Start" Target="Main" NavigateUrl="Home.aspx">  
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem runat="server" Text="Productmanager" Enabled="true" Expanded="true">  
                            <Items> 
                                <telerik:RadPanelItem Target="Main" runat="server" Value="1" Text="Producten beheren" 
                                    NavigateUrl="aaa1.aspx">  
                                </telerik:RadPanelItem> 
                                <telerik:RadPanelItem Target="Main" runat="server" Value="1" Text="Producten aanmaken" 
                                    NavigateUrl="aaa2.aspx">  
                                </telerik:RadPanelItem> 
                                <telerik:RadPanelItem Target="Main" runat="server" Value="6" Text="Producten importeren" 
                                    NavigateUrl="aaa3.aspx">  
                                </telerik:RadPanelItem> 
                                <telerik:RadPanelItem Target="Main" runat="server" Value="3" Text="Product attributen" 
                                    NavigateUrl="aaa5.aspx">  
                                </telerik:RadPanelItem> 
                            </Items> 
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem runat="server" Text="Ordermanager">  
                            <Items> 
                                <telerik:RadPanelItem Target="Main" runat="server" Value="35" Text="Orders vandaag" 
                                    NavigateUrl="~/xxx1.aspx">  
                                </telerik:RadPanelItem> 
                                <telerik:RadPanelItem Target="Main" runat="server" Value="43" Text="Order rapportage" 
                                    NavigateUrl="~/xxx2.aspx">  
                                </telerik:RadPanelItem> 
                                <telerik:RadPanelItem Target="Main" runat="server" Value="41" Text="Klantgegevens exporteren" 
                                    NavigateUrl="~/xxx3.aspx> 
                                </telerik:RadPanelItem> 
                            </Items> 
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem runat="server" Text="Contentmanager">  
                            <Items> 
                                <telerik:RadPanelItem Target="Main" runat="server" Value="0" Text="Categorie&euml;n beheren" 
                                    NavigateUrl="xxx4.aspx">  
                                </telerik:RadPanelItem> 
                                 
                            </Items> 
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem runat="server" Target="Main" Value="33" Text="Reviewmanager" 
                            NavigateUrl="xxx5.aspx">  
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem Value="21" runat="server" Text="Statistiekmanager">  
                            <Items> 
                                <telerik:RadPanelItem Target="Main" runat="server" Text="Samenvatting" NavigateUrl="~/xxxx6.aspx">  
                                </telerik:RadPanelItem> 
                      
                            </Items> 
                        </telerik:RadPanelItem> 
                    </Items> 
                    <ExpandAnimation Type="None" Duration="100"></ExpandAnimation> 
                </telerik:radpanelbar> 

2 Answers, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 19 Aug 2008, 11:09 AM
Hello binbin,

Please find below your modified code snippet that works as expected.

<form id="form1" runat="server">  
        <div> 
            <asp:ScriptManager ID="ScriptManager1" runat="server">  
            </asp:ScriptManager> 
        </div> 
 
        <script type="text/javascript">  
        function OnClientItemClicked(sender, eventArgs)  
        {  
            sender.get_expandedItem().set_expanded(true);  
        }  
        </script> 
 
        <telerik:RadPanelBar  
            ID="RadPanelBar1" 
            runat="server"   
            Width="180px"   
            Skin="Web20" 
            ExpandMode="SingleExpandedItem"   
            PersistStateInCookie="false"   
            OnClientItemClicked="OnClientItemClicked"


Greetings,
Paul
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
binbin
Top achievements
Rank 1
answered on 20 Aug 2008, 08:24 AM
Fixed, thanks Paul
Tags
PanelBar
Asked by
binbin
Top achievements
Rank 1
Answers by
Paul
Telerik team
binbin
Top achievements
Rank 1
Share this question
or