I am using Kendo UI to display the dynamic menu. How do I make this as Responsive design menu without using kendoResponsivePanel? Do you have any other menu control to have this functionality? Here is my code snippet. Please advise.
@model ghi.Domain.Models.Menu.MenuItemList
@using Kendo.Mvc.UI.Fluent
@using ghi.Domain.Models.Menu
@functions{
public void addChildren(MenuItemBuilder builder, MenuData item, MenuItemList items)
{
var children = items.data.Where(m => m.MenuParentID == item.MenuID);
if (children != null)
{
builder.Items(menuItems =>
{
foreach (var child in children)
{
var menuItem = menuItems.Add().Text(child.MenuText);
addChildren(menuItem, child, items);
}
});
}
}
}
@(Html.Kendo().Menu()
.Name("menu")
.Items(menu =>
{
menu.Add().Text("Home");
foreach (var item in Model.data.Where(m => m.MenuParentID == null || m.MenuParentID == 0))
{
var builder = menu.Add().Text(item.MenuText);
addChildren(builder, item, Model);
}
}))