All docs
V21.1
21.2 (EAP/Beta)
21.1
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.

GanttBuilder<T>.ContextMenu(Action<GanttContextMenuBuilder>) Method

Mirrors the client-side contextMenu object.

Namespace: DevExtreme.AspNet.Mvc.Builders

Assembly: DevExtreme.AspNet.Core.dll

Declaration

public GanttBuilder<T> ContextMenu(
    Action<GanttContextMenuBuilder> configurator
)

Parameters

Name Type Description
configurator Action<GanttContextMenuBuilder>

A function that allows you to specify nested options.

Returns

Type Description
GanttBuilder<T>

A reference to the Gantt object.

Remarks

@(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