RadMenu not highlighting parent menu

2 posts, 1 answers
  1. Amer
    Amer avatar
    1 posts
    Member since:
    Aug 2017

    Posted 14 Aug Link to this post

    I want to highlight the parent menu item on selecting the child menu item. I have written the script written in the examples, but the FindItemByUrl returns empty don't know why.

    Here is the script.

       Dim currentItem As RadMenuItem = RadMenu1.FindItemByUrl(Request.Url.PathAndQuery)

            If currentItem IsNot Nothing Then
                'Select the current item and his parents
                currentItem.HighlightPath()
             
            Else
                RadMenu1.Items(0).HighlightPath()
            End If

  2. Answer
    Eyup
    Admin
    Eyup avatar
    3331 posts

    Posted 17 Aug Link to this post

    Hi Amer,

    You can find a working demonstration of this approach in the following live sample:
    http://demos.telerik.com/aspnet-ajax/menu/examples/programming/showpath/defaultcs.aspx?Page=Purchase%20Orders

    And you can check the code snippets provided here:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/menu/how-to/showing-the-path-to-an-item

    You can create a new web site sample with these solutions and use it as a base reference to compare with your original project.

    Regards,
    Eyup
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top