We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Menu element on the right of the menu

Thread ID:





121137 Nov 13,2015 08:43 AM UTC Nov 16,2015 04:19 PM UTC ASP.NET MVC 1
Tags: Menu
Asked On November 13, 2015 08:43 AM UTC

Greetings. I have the following requirement: add a menu element to the syncfusion MVC menu so that this element is docked to the right of the menu (while all the others are normally docked on the left). Is it possible to met this requirement without passing the whole menu as a JSON as explained in this howto? 


At the moment the menu is created directly in the _layout.cshtml file with the following razor syntax:

@Html.EJ().Menu("mainMenu").Items(items => {

                            items.Add().Url(Url.Action("Index", "Home")).Text("Home").Children(child =>
                                        child.Add().Url(Url.Action("LogOff", "Account")).Text("Log Off");                                                                 
                                        child.Add().Url(Url.Action("LogOn", "Account")).Text("Log On");
                            items.Add().Url(Url.Action("Index", "ChiamataManutenzione")).Text("Apri chiamata");
                            items.Add().Url(Url.Action("Index", "ListaOdM")).Text("Lista OdM");
                            items.Add().Url("#").Text("Anagrafiche").Children(child =>
                                child.Add().Url(Url.Action("Index", "AnagraficaTipologiaManutenzione")).Text("Tipologie interventi");
                                child.Add().Url(Url.Action("Index", "AnagraficaCapannoni")).Text("Capannoni");
                                child.Add().Url(Url.Action("Index", "AnagraficaMacchine")).Text("Macchine");

Gobalakrishnan S [Syncfusion]
Replied On November 16, 2015 04:19 PM UTC

Hi Carlo,

Thanks for contacting Syncfusion support.

Yes we can achieve your requirement, without passing the menu as JSON. We can use the “insert” method in menu to add the menu items dynamically from client side. Please refer the following code,


    function onsubmitClick() {

        //Object for menu item created

        var obj = $("#mainMenu").ejMenu("instance");

        //Use "insert" method to add the menu items dyncamically

        obj.insert([{ id: 19, text: "Group A", htmlAttribute: { "class": "myclass" }}]);



      <style type="text/css" class="cssStyles">





We have attached a sample for your reference, please check it.

Samplelocation http://www.syncfusion.com/downloads/support/forum/121137/ze/SyncfusionMvcApplication1-872460121


Gobalakrishnan S


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon