Keep the second level Expanded

8 posts, 0 answers
  1. Andres Calvete
    Andres Calvete avatar
    9 posts
    Member since:
    Nov 2009

    Posted 10 Nov 2009 Link to this post

    Hello,

    I have a rad menu with only one Item at the top level, about 5 items on the second level and a couple other items on the other level:

    In a diagram it would be like this (the menu flows horizontally):

    Item 1
    Item1.1  Item1.2  Item 1.3  Item1.4  Item1.5
                 Item.1.2.1 Item 1.2.2.....

    I populate my radMenu from a sitemap and everything so far is fine.
    My question is if there was any way that upon loading the page, the first and second level (Item 1 and all items 1.x) will be expanded. and only have the third level fly out.

    Thanks,

    Andres Calvete
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 11 Nov 2009 Link to this post

    Hi Andres Calvete,

    Try adding following client side code in pageLoad event and see whether it helps.

    JavaScript:
     
    <script type="text/javascript"
        function pageLoad() { 
            var menu = $find('<%=RadMenu1.ClientID %>'); 
            var rootItem = menu.get_items().getItem(0); 
            rootItem.open(); 
            var level1 = rootItem.get_items().getItem(0); 
            level1.open(); 
            level1.get_items().getItem(0).open();  
        } 
    </script> 

    Regards,
    Shinu.
  3. Andres Calvete
    Andres Calvete avatar
    9 posts
    Member since:
    Nov 2009

    Posted 12 Nov 2009 Link to this post

    Thank you for your response, but that only keeps it open until I mouseOver it. I found out that the radmenu does not support
    static levels, so I took another approach. 

    Andres
  4. Yana
    Admin
    Yana avatar
    4848 posts

    Posted 16 Nov 2009 Link to this post

    Hi Andres,

    You can also use RadTabStrip as it's shown here.

    All the best,
    Yana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Jen
    Jen avatar
    2 posts
    Member since:
    Jun 2009

    Posted 20 Nov 2009 Link to this post

    Hi,

    Just wanted to double check...there is no way to keep the menu open after it is clicked?  My menu looks great and I now have the selection highlighted, but I want it to say open so the user can see the path. 

    Thanks for your help!

    Jen

  6. Yana
    Admin
    Yana avatar
    4848 posts

    Posted 23 Nov 2009 Link to this post

    Hi Jen,

    I'm afraid that RadMenu doesn't support static levels. You can try to achieve this with the help of OnClientItemClosing method which can cancel the closing of the item.

    All the best,
    Yana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  7. Tommy Kolkman
    Tommy Kolkman avatar
    1 posts
    Member since:
    Jan 2010

    Posted 29 Jan 2010 Link to this post

    "You can also use RadTabStrip as it's shown here."

    Yana, I've got a question about this. How would I implement this kind of TabStrip in a DNN website?

    Tommy
  8. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 01 Feb 2010 Link to this post

    Hi Tommy,

    After you integrate the RadTabStrip skin object in your DNN web site according to this help topic, simply use the hightlighted code below:
    <%@ Register TagPrefix="dnn" TagName="LINKS" Src="~/Admin/Skins/Links.ascx" %> 
    <%@ Register TagPrefix="dnn" TagName="PRIVACY" Src="~/Admin/Skins/Privacy.ascx" %> 
    <%@ Register TagPrefix="dnn" TagName="TERMS" Src="~/Admin/Skins/Terms.ascx" %> 
    <%@ Register TagPrefix="dnn" TagName="COPYRIGHT" Src="~/Admin/Skins/Copyright.ascx" %> 
    <%@ Register TagPrefix="dnn" TagName="STYLES" Src="~/Admin/Skins/Styles.ascx" %> 
    <%@ Register TagPrefix="dnn" TagName="RADTABSTRIP" Src="~/DesktopModules/telerik.skinobjects/RadTabStrip.ascx" %>  
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
        
       <script type="text/javascript"
          
       function OnClientMouseOver(sender, eventArgs) 
                {              
                    var tab = eventArgs.get_tab(); 
                    tab.select(); 
                
        
       </script
        <div id="s_wrap_main"
            <div id="s_wrap_sub"
                <div class="template_style"
        
                * * * 
                                <div class="menu_style"
                                                     
                              <dnn:RADTABSTRIP ID="RADTABSTRIP" OnClientMouseOver="OnClientMouseOver"
                                 runat="server" /> 
                                </div
                                <div class="clear_float"
                                </div
                            </div
                        </div
                    </div>


    Greetings,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top