Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
762
Adding a WinGrid context menu command
posted

How does one add a command to a WinGrid's context menu? I have a WinGrid with a ContextMenuUltra property of "OrderContextMenu", but this is not editable anywhere I can see. I have an UltraWinToolbarsManager, but the Toolbars property of the manager is empty.

Searching the code for "OrderContextMenu" finds a PopupMenuTool defined in the grid's form's Designer.cs file with this name, and its Toolbase property is set to the existing commands, but how do I add a new one? There seems to be no UI to do this, they do not appear in the Visual Studio Properties panel, nor the Infragistics grid wizard. The existing commands are in the UltraWinToolbarsManager's Tools properties, but all commands in the form are here. Do I add the command here? How do I tell it to appear only in the grid's context menu?

  • 469350
    Verified Answer
    Offline posted

    It sounds like you should be posting this question in the WinToolbars forum. It really has nothing to do with the grid, since it appears that the menu you are talking about is an PopupMenuTool.

    The WinToolbars component has a designer, though. So you should just be able to modify the component and add tools to the form designer. Or right-click on the ToolbarsManager in the component tray of the form designer to bring up it's designer.