This is a migrated thread and some comments may be shown as answers.

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

1 Answer 147 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Kanimozhi
Top achievements
Rank 1
Kanimozhi asked on 09 Jan 2014, 10:09 AM
Hi,


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:

@(Html.Kendo().Menu()
.Name("MenuHeader").HtmlAttributes(new { @class = "headermenu"
})
.Orientation(MenuOrientation.Horizontal)
.Items(items =>
{
items.Add().Text("Product").Action("Product ", "Home");
items.Add().Text("Category").Action("Category", "Category");
}).Events(e=>e.Select("onSelect"))
)

And,
Within product I am having another partial view,
@(Html.Kendo().Menu()
.Name("Menu")
.Orientation(MenuOrientation.Vertical)
.Items(items =>
{
items.Add().Text("ListBox").Action("ListBox ","ListBox ");
items.Add().Text("DropDown").Action("DropDown ","DropDown ");
items.Add().Text("TextBox").Action("TextBox ","TextBox ");
})
)

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 13 Jan 2014, 12:27 PM
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.

Regards,
Georgi Krustev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Menu
Asked by
Kanimozhi
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or