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.
Unfortunately, activation email could not send to your email. Please try again.

Context menu. Add SubSubMenu.

Thread ID:

Created:

Updated:

Platform:

Replies:

131763 Jul 26,2017 06:43 AM Sep 12,2017 09:17 AM Angular 3
loading
Tags: ejGrid
Agne
Asked On July 26, 2017 06:43 AM

Hello,

is there a possibility to add SubSubMenu ir ejGrid context menu?

To look like this:


Thavasianand Sankaranarayanan [Syncfusion]
Replied On July 27, 2017 12:11 PM

Hi Agne, 

Thanks for contacting Syncfusin support. 

We have analyzed your query and this is already an known improvement “Template support for subcontextmenu items”. It will be included in our Volume 3, 2017 which has been scheduled to be rolled in the first week of August 2017. 
 
Regards, 
Thavasianand S. 


Agne
Replied On September 11, 2017 05:42 AM

Hello again,

I want to ask maybe there is a possibility in newest release to add SubSubMenu in ejGrid context menu like I asked before? Or I can do it only with ejMenu component?


Thavasianand Sankaranarayanan [Syncfusion]
Replied On September 12, 2017 09:17 AM

Hi Agne, 

Thanks for your update. 

In the latest Essential studio version(15.3.0.29), we are able to render the submenu inside another submenu as a template in the contextmenu of ejGrid control. 

Refer the below code example. 

[app.component.html] 

<ej-grid id="Grid" [dataSource]="gridData2" [allowPaging]="true" [allowSorting]="true" 
 
   [contextMenuSettings]="contextMenuSettings" (contextClick)= "contextClick($event)">  
 
    <e-columns> 
         
        ---- 
 
   </e-columns> 
 
</ej-grid> 
 
--------------------------------------- 
[app.component.ts] 

export class AppComponent { 
      
     public contextMenuSettings; 
      
        contextClick(e: any){ 
        
              alert(e.text); 
        
        } 

          constructor() { 
 
 
        this.contextMenuSettings = { 
 
            enableContextMenu: true, contextMenuItems: [], 
 
            customContextMenuItems: [{ id: 'clear', text: "Clear Selection" }, 
                                     { id: 'hide', text: "Hide column" } 
            ], 
 
            subContextMenu: [{ 
 
                contextMenuItem: "hide", 
 
                template: "#template" 
            }] 
        }; 
 
    } 
} 
 
-------------------------------------------- 
[index.html] 

<script type="text/x-jsrender" id="template"> 
        <ul> 
            <li> 
               <a>OrderID</a> 
               <ul> 
                  <li><a>10248</a></li> 
                 <li><a>10249</a></li> 
                </ul> 
           </li> 
            <li><a>CustomerID</a></li> 
            <li><a>EmployeeID</a></li> 
        </ul> 
</script> 



Refer the below screen shot. 

 

We have prepared a sample and it can be downloadable from the below location. 


Refer the help documentation. 


Regards, 
Thavasianand S. 


CONFIRMATION

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.

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.

;