This question is locked. New answers and comments are not allowed.
Hello, community
this is my code:
<%=Html.Telerik().Menu()
.Name("Menu")
.Orientation(MenuOrientation.Horizontal)
.BindTo(ServiceLocator.Current.GetInstance<ILoggedOnUser>().UserModels, mapping => mapping
.For<Modulo>(binding => binding
.Children(c => c.ModulosModuloParentList)
.ItemDataBound((item, c) =>
{
item.Text = c.Nome;
item.Action(c.Action, c.Controller, null);
}))
)
%>
I'm trying to set the menu working but i always get this a null exception but the properties that i want to bind are not null
this is the stack trace
at Telerik.Web.Mvc.Infrastructure.Implementation.AuthorizeAttributeCache.GetAuthorizeAttributes(RequestContext requestContext, String controllerName, String actionName)
at Telerik.Web.Mvc.Infrastructure.Implementation.ControllerAuthorization.IsAccessibleToUser(RequestContext requestContext, String controllerName, String actionName)
at Telerik.Web.Mvc.Infrastructure.Implementation.NavigationItemAuthorization.IsAccessibleToUser(RequestContext requestContext, INavigatable navigationItem)
at Telerik.Web.Mvc.UI.Menu.WriteItem(MenuItem item, IHtmlNode parentTag, IMenuHtmlBuilder builder)
at Telerik.Web.Mvc.Extensions.EnumerableExtensions.Each[T](IEnumerable`1 instance, Action`1 action)
at Telerik.Web.Mvc.UI.Menu.WriteHtml(HtmlTextWriter writer)
at Telerik.Web.Mvc.UI.ViewComponentBase.Render()
at Telerik.Web.Mvc.UI.ViewComponentBuilderBase`2.Render()
at Telerik.Web.Mvc.UI.ViewComponentBuilderBase`2.ToString()
at System.Web.HttpWriter.Write(Object obj)
someone knows how to bind the action.
if i set the url property it works.
But not ActionName and ControllerName properties
hope someone can help