This question is locked. New answers and comments are not allowed.
Hello everyone,
I wish to make some items in the menu clickable and some not.
<%= Html.Telerik().Menu()
.Name("Menu")
.BindTo(Model.applicationMenu, mappings =>
{
mappings.For<ApplicationsMenu>(binding => binding
.ItemDataBound((item, applicationMenu) =>
{
item.Text = applicationMenu.MenuName;
item.Url = VirtualPathUtility.ToAbsolute("~/") + applicationMenu.MenuTarget;
})
);
})
%>
In this case if the menuTarget is empty, then i do not want the link to be clickable.
I tried putting the setting of the item.Url in an if statement but it did not work too.
Thank you.
I wish to make some items in the menu clickable and some not.
<%= Html.Telerik().Menu()
.Name("Menu")
.BindTo(Model.applicationMenu, mappings =>
{
mappings.For<ApplicationsMenu>(binding => binding
.ItemDataBound((item, applicationMenu) =>
{
item.Text = applicationMenu.MenuName;
item.Url = VirtualPathUtility.ToAbsolute("~/") + applicationMenu.MenuTarget;
})
);
})
%>
In this case if the menuTarget is empty, then i do not want the link to be clickable.
I tried putting the setting of the item.Url in an if statement but it did not work too.
Thank you.