I wanted to set the menu item selection based on a persisted item index but cannot see how I can access the menu item index from within the BindTo() section. I have worked around this in the code below by matching on the label but this is not ideal. Is it possible to compare the item index instead? Thanks.
@(Html.Kendo().Menu()
.Name(
"viewTypeMenu"
)
.HighlightPath(
false
)
.BindTo(Model.ViewTypeLabels, (item, value) =>
{
item.Text = value;
item.Selected = (value == Model.SelectedViewTypeLabel);
})
)