I built a multi-level vertical menus on a menu partial view.
On my layou view I set it like this:
I got the below errors:
0x800a01b6 - Microsoft JScript runtime error: Object doesn't support property or method 'kendoMenu' at the line of:
<ul class="k-widget k-reset k-header k-menu" id="menu"><li class="k-item k-state-highlight k-state-default"><a class="k-link" href...">Home</a></li><li class="k-item k-state-default"><span class="k-link">My Account</span></li><li class="k-item k-state-default"><span class="k-link">Admin<span class="k-icon k-i-arrow-s"></span></span><ul class="k-group"><li class="k-item k-state-default"><a class="k-link" href...">User Management</a></li></ul></li><li class="k-item k-state-default"><a class="k-link" href="...">About</a></li></ul><script>
jQuery(function(){jQuery("#menu").kendoMenu({});});
</script>
I have include the scripts in my layout:
<script src="@Url.Content("~/Scripts/jquery.min.js")"></script>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
@Styles.Render("~/Content/kendo")
@Scripts.Render("~/bundles/kendo")
I created those bundles in bundle configuration. What do I miss then?
And my menus look weird(see the attached file) after choosing "continue" after the above error(I'm using MVC4 and latest kendo complete for ASP.NET MVC).
1. Two look greyed out and two look enabled, but if click it does take you to the destination.
2. The popup submenu has a space between popup and the parent menu.
3. The menu is in an splitter pane. After collapse the pane and re-expand it, the popup doesn't show. You can see there appears a horizontal scrollbar instead in the pane.
How can I make all the menus look "not greyed"? How to get rid of the space? How to keep same after re-expand after collapse the splitter pane? I also don't like the little white rectangle and dark-grey rectangle shown on the screen at the corner of the menu item. How to make it look like the kendo demo?
I have tried couple of days trying to solve the above issues, but it didn't work.
Thanks.
@using Kendo.Mvc.UI.Fluent
@using MyModels;
@functions{
public void addChildren(MenuItemBuilder builder, AppMainMenu item, IEnumerable<
MyMenuStructure
> items)
{
var children = items.Where(m => m.ParentMenuID == item.MenuID);
if (children != null)
{
builder.Items(menuItems =>
{
foreach (var child in children)
{
var menuItem = menuItems.Add().Text(child.Name);
menuItem.Action(child.Action, child.Controller);
}
addChildren(menuItem, child, items);
}
}
);
}
}
}
@(Html.Kendo().Menu()
.Name("menu")
.Items(menu => {
using (PCSContext pcscontext = new PCSContext())
{
var menus = got my menu structures;
foreach (var item in menus.Where(m=> m.ParentMenuID == null))
{
var builder = menu.Add().Text(item.Name);
builder.Action(item.Action, item.ControllerName);
addChildren(builder, item, menus);
}
}
}
)
)
Html.Partial("~/Views/Shared/_MyMenu.cshtml");
<
script
>
$("#menu").kendoMenu({
animation: { open: { effects: "fadeIn" } },
orientation: "vertical",
direction: "left"
});
</
script
>
I got the below errors:
0x800a01b6 - Microsoft JScript runtime error: Object doesn't support property or method 'kendoMenu' at the line of:
<ul class="k-widget k-reset k-header k-menu" id="menu"><li class="k-item k-state-highlight k-state-default"><a class="k-link" href...">Home</a></li><li class="k-item k-state-default"><span class="k-link">My Account</span></li><li class="k-item k-state-default"><span class="k-link">Admin<span class="k-icon k-i-arrow-s"></span></span><ul class="k-group"><li class="k-item k-state-default"><a class="k-link" href...">User Management</a></li></ul></li><li class="k-item k-state-default"><a class="k-link" href="...">About</a></li></ul><script>
jQuery(function(){jQuery("#menu").kendoMenu({});});
</script>
I have include the scripts in my layout:
<script src="@Url.Content("~/Scripts/jquery.min.js")"></script>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
@Styles.Render("~/Content/kendo")
@Scripts.Render("~/bundles/kendo")
I created those bundles in bundle configuration. What do I miss then?
And my menus look weird(see the attached file) after choosing "continue" after the above error(I'm using MVC4 and latest kendo complete for ASP.NET MVC).
1. Two look greyed out and two look enabled, but if click it does take you to the destination.
2. The popup submenu has a space between popup and the parent menu.
3. The menu is in an splitter pane. After collapse the pane and re-expand it, the popup doesn't show. You can see there appears a horizontal scrollbar instead in the pane.
How can I make all the menus look "not greyed"? How to get rid of the space? How to keep same after re-expand after collapse the splitter pane? I also don't like the little white rectangle and dark-grey rectangle shown on the screen at the corner of the menu item. How to make it look like the kendo demo?
I have tried couple of days trying to solve the above issues, but it didn't work.
Thanks.