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?
[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>
|