How to set main menu remains selected on navigation to multiple controller/view within the menu?

2 posts, 0 answers
  1. Kanimozhi
    Kanimozhi avatar
    1 posts
    Member since:
    Nov 2013

    Posted 09 Jan 2014 Link to this post


    I have a kendo menu with two menu items in partial view. Inside a single menu, I have multiple controller/view navigation. But the issue here is only for the single controller action (default controller mentioned in menu), the menu remains selected(selected style applied). If I am navigating to different Controller/View within the menu, it doesn’t remain selected (default style).

    Any solution for this or how to achieve it?

    Code will be as below:

    .Name("MenuHeader").HtmlAttributes(new { @class = "headermenu"
    .Items(items =>
    items.Add().Text("Product").Action("Product ", "Home");
    items.Add().Text("Category").Action("Category", "Category");

    Within product I am having another partial view,
    .Items(items =>
    items.Add().Text("ListBox").Action("ListBox ","ListBox ");
    items.Add().Text("DropDown").Action("DropDown ","DropDown ");
    items.Add().Text("TextBox").Action("TextBox ","TextBox ");

  2. Georgi Krustev
    Georgi Krustev avatar
    3687 posts

    Posted 13 Jan 2014 Link to this post

    Hello Kanimozhi,

    In general, the HighlightPath functionality tries to select a specific menu item, which points to the current opened URL. Unfortunately, I am not exactly sure what happens in your case and I will need additional information. It will be very helpful if you can prepare a simple test project, which replicates the problem. Thus I will be able to review it locally and advice you further.

    Georgi Krustev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET AJAX banner
Back to Top