All docs
V20.1
20.2 (EAP/Beta)
20.1
19.2
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.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

GanttControl.TaskPopupMenuShowing Event

Fires when a context menu for a task is about to be shown.

Namespace: DevExpress.XtraGantt

Assembly: DevExpress.XtraGantt.v20.1.dll

Declaration

[DXCategory("Events")]
public event GanttTaskPopupMenuShowingEventHandler TaskPopupMenuShowing
<DXCategory("Events")>
Public Event TaskPopupMenuShowing As GanttTaskPopupMenuShowingEventHandler

Event Data

The TaskPopupMenuShowing event's data class is GanttTaskPopupMenuShowingEventArgs. The following properties provide information specific to this event:

Property Description
Cancel Gets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
Info Provides access to view information about the task.
Items Provides access to menu items.
Node Gets the node in the tree area for which the menu is about to be shown.

Examples

The code below shows how to populate the context menu with items.

using DevExpress.XtraEditors;
using DevExpress.XtraGantt;

private void ganttControl1_TaskPopupMenuShowing(object sender, GanttTaskPopupMenuShowingEventArgs e) {
    e.Items.Add(new DevExpress.Utils.Menu.DXMenuItem("Show Text", (ss, ee) => { XtraMessageBox.Show(e.Node.GetText()); }));
}
See Also