ShowPath and redirecting to pages

Thread is closed for posting
4 posts, 0 answers
  1. Peter Georgiev
    Peter Georgiev avatar
    14 posts
    Member since:
    Jan 2006

    Posted 11 Aug 2006 Link to this post


    RadControls version

    v4.x or Telerik.Web.UI v2007.3 1425

    .NET version


    Visual Studio version


    programming language


    browser support

    all browsers supported by RadMenu

    To convert code
    from posted project(s)
    Telerik online converter

    This project shows how to implement the Show Path functionality when some of the menu items use the NavigateUrl property (handled in the Page Load event). The case when a menu item only postbacks with no redirection to another page, is also covered (handled in the ItemClicked event).
  • Telerik Admin
    Telerik Admin avatar
    1572 posts
    Member since:
    Oct 2004

    Posted 26 May 2008 Link to this post

    The show path implementation has been updated to use the HighlightPath() method. The old approach is commented to show alternative solution in case you want to use your custom css class for highlighting the items.
  • max
    max avatar
    42 posts
    Member since:
    Nov 2007

    Posted 10 Jun 2008 Link to this post

    Hi, is there a client side via javascript equivalent?
  • Veselin Vasilev
    Veselin Vasilev avatar
    2992 posts

    Posted 10 Jun 2008 Link to this post

    For RadMenu for ASP.NET AJAX you can use the following javascript code:

    <script type="text/javascript">  
    function pageLoad()  
        var menu = $find("<%= RadMenu2.ClientID %>");  
        var href = window.location.href;  
        var index = href.lastIndexOf("/");  
        var pageURL = href.substring(index + 1);  
        var items = menu.get_items();  
        var item = null;  
        for (var i = 0; i < items.get_count(); i++)  
            if (items.getItem(i).get_navigateUrl() == pageURL)  
                item = items.getItem(i);  
        if (item)  
            while (item != menu)  
                var element = item.get_linkElement();  
                element.className += " rmFocused";  
                item = item.get_parent();  

    the telerik team
  • Back to Top

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