GanttBuilder<T>.ContextMenu(Action<GanttContextMenuBuilder>) Method
Configures the context menu settings. 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