This sample illustrates how you can customize the popup-menu that is shown by the right-click onto the Design panel of the Report Designer.
In particular, it illustrates the process of adding the option of showing and hiding the Designer grid.
Question Comments
Added By: Marco Zierl 1 at: 5/21/2013 3:13:23 AM
Hi,
I want to use this approach to remove the "Edit Parameters ..." command from the pop-up menu in the field list. What I came up with looks like this:
public void ProcessMenuItems(MenuKind menuKind, MenuItemDescriptionCollection items)
{
if (menuKind == MenuKind.FieldList)
{
CommandID removeCommand = null;
foreach (var item in items)
{
if (item.CommandID != null && item.CommandID.ID == 6) removeCommand = item.CommandID;
}
if (removeCommand != null) items.Remove(removeCommand);
}
}
Obviously, hard-coding the command ID (6) is not a good solution, but I could not find the corresponding Enum value. Can you help me here?
Marco
Added By: Uwe Philipps at: 10/1/2013 3:33:28 AMWhen using this example I only see the custom menu items on the first time the designer is shown.
When opening the designer again, ProcessMenuItems() is not called and the custom menu items are not shown.
I'm using Visual Studio 2010 and DevExpress Reporting V13.1.7