- Default Context Menu
- Custom Context Menu
Contact Support
Context Menu
1 Oct 20152 minutes to read
Default Context Menu
The default context menu contains the following options.
- Task Details
- Add New Task
- Indent
- Outdent
- Delete
The following code example shows you how to enable the default context menu in Gantt control.
<ej:Gantt ID="GanttContainer" runat="server" EnableContextMenu="true">
The following screenshot shows the Default Context Menu in Gantt control.
Custom Context Menu
You can add custom context menu option in Gantt control. The following code example shows you how to add the custom context menu option in Gantt control.
<script type="text/javascript">
function contextMenuOpen(args) {
args.contextMenuItems.push(
{
headerText: "ExpandAll",
iconPath: "url(../images/Expand All.png)",
evenHandler: function () {
//event handler for custom menu items
}
});
}
</script>
<ej:Gantt ID="GanttContainer" runat="server" EnableContextMenu="true" ContextMenuOpen="contextMenuOpen">
The screenshot of the Custom Context Menu items in Gantt control is as follows.