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

3 posts, 0 answers
  1. binbin
    binbin avatar
    26 posts
    Member since:
    Sep 2006

    Posted 19 Aug 2008 Link to this post


    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. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 19 Aug 2008 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. binbin
    binbin avatar
    26 posts
    Member since:
    Sep 2006

    Posted 20 Aug 2008 Link to this post

    Fixed, thanks Paul
Back to Top