New to Telerik UI for WinFormsStart a free 30-day trial

Modifying Context Menu

Updated over 6 months ago

When a context menu in RadGanttView is about to be opened the ContextMenuOpening event is fired. This event allows you to customize the items shown in the context menu.

The event arguments have the following properties:

  • Item – the item for which a menu is about to be opened.

  • Menu – the menu that will be shown.

  • Cancel – allows you to stop the showing of the menu. Set this property to true to cancel the opening.

Here is an example which demonstrates how to change the progress step of the default context menu.

C#
private void radGanttView1_ContextMenuOpening(object sender, GanttViewContextMenuOpeningEventArgs e)
{
    GanttViewDefaultContextMenu menu = e.Menu as GanttViewDefaultContextMenu;
    if (menu != null)
    {
        menu.ProgressStep = 25;
    }
}

WinForms RadGanttView Modifying Context Menu

See Also

In this article
See Also
Not finding the help you need?
Contact Support