SharePoint 2007 RadMenu Control

Thread is closed for posting
4 posts, 1 answers
  1. Answer
    IT Department
    IT Department avatar
    21 posts
    Member since:
    Apr 2007

    Posted 22 Jan 2009 Link to this post


    RadControls version RadControls for ASP.NET Q2 2007
    .NET version 2.0
    Visual Studio version 2005
    programming language C#
    browser support

    all browsers supported by RadControls

    This comes with no warranty and is used at own risk.

    A Sharepoint Office Server 2007 component for using RadMenu as the top bar menu on the portal.

    This component consist of a class inheriting from Telerik.WebControls.RadMenu.

    This component is not build as a SharePoint solution package. It is recommended that you do so, using for example WSS Extensions for Visual Studio.

    Installation instructions:
    1. Build the project using Visual Studio 2005 / 2008
    2. Add the .dll to the GAC on the SharePoint Front-End Server(s)
    3. Run iisreset (to allow SharePoint discover the new component i the GAC)
    4. Open your master page in, and add the new control, using the following code:

    <%@ Register TagPrefix="telerik" Namespace="Telerik.WebControls" Assembly="RadMenu.Net2, Version=, Culture=neutral, PublicKeyToken=bbe59a8ad3533e68" %> 
    <%@ Register TagPrefix="ErgoGroup" Namespace="EG.MOSSRadMenuControl" Assembly="EG.MOSSRadMenuControl, Version=, Culture=neutral, PublicKeyToken=a0d334afb73e74c8" %> 
                        <asp:ContentPlaceHolder id="PlaceHolderHorizontalNav" runat="server"
                                        <!-- fix for RadMenu CSS conflict when used in SharePoint --> 
                                        <ergogroup:MOSSRadMenu NumLevels="1" id="mossRadMenu" runat="server" Skin="Default2006" AppendDataBoundItems="true" 
                                        DataSourceId="siteMapDataSource1" CollapseDelay="0"  
                                                <telerik:RadMenuItem Value="" Text="Home" NavigateUrl="/" runat="server" /> 
                                            <ExpandAnimation Type="None" Duration="0"></ExpandAnimation> 
                                            <CollapseAnimation Type="None" Duration="1000"></CollapseAnimation> 
                                        <style type="text/css">.radmenu ul li {margin:0px;}</style> 
                                    <PublishingNavigation:PortalSiteMapDataSource ID="siteMapDataSource1" Runat="server" 
                                        SiteMapProvider="CombinedNavSiteMapProvider" EnableViewState="true" 
                                        StartFromCurrentNode="true" StartingNodeOffset="0" ShowStartingNode="false" 
                                        TreatStartingNodeAsCurrent="true" TrimNonCurrentTypes="Heading"/> 

  2. Ali
    Ali avatar
    4 posts
    Member since:
    Dec 2010

    Posted 10 Mar 2011 Link to this post


    I have tried this approach but it does not appear good to me.

    Can you please elaborate more on how to go about RadMenu Control in Master Page.

  3. IT Department
    IT Department avatar
    21 posts
    Member since:
    Apr 2007

    Posted 14 Mar 2011 Link to this post

    Hi Ali,

    Please make sure that you have the correct Telerik components installed. Then build the attached project files, and add EG.MOSSRadMenuControl to the Global Assembly Cache (GAC). Also make sure that you reference both necessary Telerik components as well as EG.MOSSRadMenuControl in the SharePoint SafeControls in the web.config file.

    With that in place, you should be able to use it in you masterpage. Please be aware that this solution was built for SharePoint 2007. I have not tested it in SharePoint 2010.

    Hope this helps.

  4. Richelle Dubif
    Richelle Dubif avatar
    12 posts
    Member since:
    Mar 2010

    Posted 30 Mar 2011 Link to this post

    Thank you frankok.  Works a treat in SharePoint 2007.  I added this code after the ParseMenuStructure to make it work like the default MOSS menu:


    RadMenuItem[] mArray = new RadMenuItem[this.Items[0].Items.Count];
    this.Items[0].Items.CopyTo(mArray, 0);




    And this is what is in my masterpage (I've not removed the items yet):

            <EG:MOSSRadMenu id="mossRadMenu" runat="server"

                <ExpandAnimation Type="InBack" Duration="200"></ExpandAnimation> 
                <CollapseAnimation Type="None" Duration="200"></CollapseAnimation> 

                    <tel:RadMenuItem Value="" Text="Home" NavigateUrl="/" runat="server"/> 

            <PublishingNavigation:PortalSiteMapDataSource ID="siteMapDataSource1" Runat="server" 
                SiteMapProvider="CombinedNavSiteMapProvider" EnableViewState="false" 
                StartFromCurrentNode="true" StartingNodeOffset="0" ShowStartingNode="true" 
                TreatStartingNodeAsCurrent="true" TrimNonCurrentTypes="Heading"/> 

    With the ShowStartingNode="true" and the above code change you get the navigation's site included at the start.  The code block moves the child items from the level below up one level so you avoid the single menu item problem you'd get otherwise.  Hope that is helpful, and would love to hear of any better ways to accomplish this if you know better.

    Thanks again for sharing your solution.

Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.