|
Since the Default Context Menu of Designer control is not customizable, you may want to disable it and display some other menu.
The Default Context Menu can be disabled in the ContextMenuOpen event of Designer control,
It’s enough to set the Cancel property to True. The Designer control allows to set up the Custom Context Menu
at design-time and at run-time, e.g. add a new context menu at design time then select a new menu in ContextMenu property of Designer
and add the following code in code-behind.
[C#]
private void ardMain_ContextMenuOpen(object sender, DataDynamics.ActiveReports.Design.Designer.ContextMenuOpenArgs eArgs)
{
eArgs.Cancel = true;
// e.Cancel = true; for Active Reports .NET 3.0
}
[VB.NET]
Private Sub ardMain_ContextMenuOpen(ByVal sender As Object, ByVal eArgs As Design.Designer.ContextMenuOpenArgs) Handles ardMain.ContextMenuOpen
eArgs.Cancel = True
‘ e.Cancel = true in Active Reports .NET 3.0 case End Sub
Applies To: ActiveReports for .NET 1.0 ActiveReports for .NET 2.0 ActiveReports for .NET 3.0
|