Modifying Context Menu
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.
private void radGanttView1_ContextMenuOpening(object sender, GanttViewContextMenuOpeningEventArgs e)
{
GanttViewDefaultContextMenu menu = e.Menu as GanttViewDefaultContextMenu;
if (menu != null)
{
menu.ProgressStep = 25;
}
}
Private Sub radGanttView1_ContextMenuOpening(sender As Object, e As GanttViewContextMenuOpeningEventArgs)
Dim menu As GanttViewDefaultContextMenu = TryCast(e.Menu, GanttViewDefaultContextMenu)
If menu IsNot Nothing Then
menu.ProgressStep = 25
End If
End Sub