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. Image for the cookie policy date

how I add a menu in the grid toolbar

I would like to add a menu in the toolbar which is in the grid but it doesn´t work, thanks for the help

Attachment: toolbar_grid_284a8cc2.zip

1 Reply

TS Thavasianand Sankaranarayanan Syncfusion Team November 22, 2019 01:10 PM UTC

Hi Ricardo,  

Greetings from Syncfusion support 

We suggest you to follow the below steps. Here we have used the created event to render the Menu in grid toolbar. Please follow the code snippet and sample for more reference. 


    List<object> toolbarItems = new List<object>(); 
    toolbarItems.Add(new { text = "Menu", template = "#menuitem" }); 
<div id="menuitem">                                                               // div element is created 
    <ul class="menu" id="tool_menu"></ul> 
    function created() { 
        var menuItems = [ 
                text: 'Items', 
                iconCss: 'e-icons MT_menu1', 
                items: [ 
                    { text: 'Item 1' },                           // items in the Menu  
                    { text: 'Item 2' }, 
                    { text: 'Item 3' }, 
        var menuObj = new ej.navigations.Menu({ items: menuItems, select: onMenuSelect });  //Menu is created 
        menuObj.appendTo("#tool_menu");                                         // Menu is append to created div element 
    function onMenuSelect(args) { 
        // Triggers on selecting menu item 

Please get back to us if you need further assistance 

Thavasianand S. 

Live Chat Icon For mobile
Up arrow icon