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

Highlighting the selected item

2 Answers 173 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Jean
Top achievements
Rank 1
Jean asked on 29 Aug 2012, 09:56 PM
What is the simplest way to hightlight the selected top level menu item using the Server Side Kendo Menu MVC Helper? The default behaviour does not highlight the selected item.

All I have is

@(Html.Kendo().Menu()
					.Name("menu")
                                    .Items(menu =>
                                    {
                                        menu.Add().Text("Home").Action("Index""Home");
                                        menu.Add().Text("About").Action("About""Home");
                                    }).Events(events => events.Select("onSelect"))
                    )

in my Layout.cshtml razor page. A small sample project would be ideal, if there is no simple way to hightligh the selected item.

Any help would be appreciated.
Thanks
Jean

2 Answers, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 04 Sep 2012, 06:06 AM
Hi Jean,

There is an option called .HighlightPath(true). If you enable it the items in your menu which are related to the current URL will be highlighted.


Regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jean
Top achievements
Rank 1
answered on 13 Sep 2012, 10:34 PM
Petur,

That does not work unfortunately. If you create a clean Kendo UI for MVC Extensions project (using the Template from nuget) and you add the method, the menu does NOT highlight your selection.

Am I missing something? (e.g. Does the menu need a sitemap?)

If you could provide a really simple sample I would appreciate it.

Thanks again.
Jean
Tags
Menu
Asked by
Jean
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Jean
Top achievements
Rank 1
Share this question
or