Skip to main content
All docs
V25.1
  • GanttControl.TaskPopupMenuShowing Event

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

    Namespace: DevExpress.XtraGantt

    Assembly: DevExpress.XtraGantt.v25.1.dll

    NuGet Package: DevExpress.Win.Gantt

    Declaration

    [DXCategory("Events")]
    public event GanttTaskPopupMenuShowingEventHandler TaskPopupMenuShowing

    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.

    Example

    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