// GET: Template public ActionResult Template() { List <object> data = new List <object>() { new { category = "Products", options = new List <object>() { new { value = "JavaScript", url = "javascript" }, new { value = "Angular", url = "angular" }, new { value = "ASP.NET Core", url = "core" }, new { value = "ASP.NET MVC", url = "mvc" } } }, new { category = "Services", options = new List <object>() { new { value = "Application Development", count = "1200+" }, new { value = "Maintenance & Support", count = "3700+" }, new { value = "Quality Assurance" }, new { value = "Cloud Integration", count = "900+" } } }, new { category = "About Us", options = new List <object>() { new { id = "about", about = new List <object>() { new { value = "We are on a mission to provide world-class best software solutions for web, mobile and desktop platforms. Around 900+ applications are desgined and delivered to our customers to make digital & strengthen their businesses." } }[0] } } }, new { category = "Careers" }, new { category = "Sign In" } }; MenuFieldSettings menuFields = new MenuFieldSettings() { Text = new string[] { "category", "value" }, Children = new string[] { "options" } }; ViewBag.data = data; ViewBag.menuFields = menuFields; return(View()); }
//public static List<Menu1> GetLocalData() public ActionResult RetrieveMenu() { // For MenuFieldSettings type, include Syncfusion.EJ2.Navigations in the using directive section. MenuFieldSettings menuFields = new MenuFieldSettings() { Text = new string[] { "Menu1", "Menu2", "Menu3" }, Children = new string[] { "Menus2", "Menus3" } }; // Assign Local data from Model to ViewBag.menuItems //ViewBag.menuItems = Model.GetLocalData(); ViewBag.menuFields = menuFields; return(View()); }
// GET: Api public ActionResult Api() { List <object> data = new List <object>() { new { header = "Events", subItems = new List <object>() { new { text = "Conferences" }, new { text = "Music" }, new { text = "Workshops" } } }, new { header = "Movies", subItems = new List <object>() { new { text = "Now Showing" }, new { text = "Coming Soon" } } }, new { header = "Directory", subItems = new List <object>() { new { text = "Media Gallery" }, new { text = "Newsletters" } } }, new { header = "Queries", subItems = new List <object>() { new { text = "Our Policy" }, new { text = "Site Map" }, new { text = "24x7 Support" } } }, new { header = "Services" } }; MenuFieldSettings menuFields = new MenuFieldSettings() { IconCss = "icon", Text = new string[] { "header", "text", "value" }, Children = new string[] { "subItems", "options" } }; List <object> headerData = new List <object>() { new { text = "Events" }, new { text = "Movies" }, new { text = "Directory" }, new { text = "Queries" }, new { text = "Services" } }; List <object> ddlData = new List <object>() { new { value = "Horizontal", text = "Horizontal" }, new { value = "Vertical", text = "Vertical" }, }; ViewBag.data = data; ViewBag.menuFields = menuFields; ViewBag.ddlData = ddlData; ViewBag.headerData = headerData; return(View()); }