All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
JS

GanttContextMenuItem Enum

Lists the context menu commands.

Namespace: DevExtreme.AspNet.Mvc

Assembly: DevExtreme.AspNet.Core.dll

Declaration

[JsonConverter(typeof(StringEnumConverter))]
public enum GanttContextMenuItem

Members

Name Description
Undo

A command that redoes the last action.

Redo

A command that redoes the last undone action.

ExpandAll

A command that expands all tasks.

CollapseAll

A command that collapses all tasks.

AddTask

A command that adds a new task.

DeleteTask

A command that deletes a task.

ZoomIn

A command that zooms the chart in.

ZoomOut

A command that zooms the chart out.

DeleteDependency

A command that deletes a dependency.

TaskDetails

A command that opens the edit dialog.

Remarks

Run Demo: Context Menu

Use the ContextMenu(Action<GanttContextMenuBuilder>) method to create the context menu.

@(Html.DevExtreme().Gantt()
    .ContextMenu(cm => {
        cm.Items(i => {
            i.Add().Name(GanttContextMenuItem.AddTask);
            i.Add().Name(GanttContextMenuItem.TaskDetails);
            i.Add().Name(GanttContextMenuItem.DeleteTask);
            i.Add().Name("ToggleDisplayOfResources").Text("Toggle Display of Resources");
        });
    })
    //...
)
See Also