Skip to main content
A newer version of this page is available. .
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