1 Solution
A solution for this task requires additional coding.
Disable the SyncSelectionMode setting, it is useless in this scenario.
In a controller's constructor, add an indicator to the ViewBag object or to the ViewData collection to indicate which controller's method has been called.
In the ' _layout.cshtml ' View use the indicator value to select a corresponding Menu item in code.
-
Thanks Vladimir. I now manually set the items to Selected according as per your suggestion as they are added, i.e.
settings.Items.Add(item => {
item.Text = "My Claims";
item.NavigateUrl = "~/Claims";
if (controller == "Claims")
{
item.Selected = true;
}
}... and everything works fine. Many thanks.
-
You are always welcome!
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.
Facebook
Twitter
Google+