We are trying to manage our own custom Context Menu from our WinForms GridControl. We are managing this by using the MouseDown on the TemplateRow’s cell, where only one single cell of the TemplateRow can allow a right-click to show the Context Menu.
What we are noticing is that our own ContextMenu is getting pushed behind another ContextMenu which we are not controlling. This ContextMenu has the following items:
Undo (Greyed Out)
Delete (Greyed Out)
We do not know where this ContextMenu is coming from, but we would like to remove it so we can control the ContextMenu ourselves. Please can you let us know how this can be achieved within the GridControl, if indeed it is the Grid or its child objects that are controlling this ContextMenu.
I can provide a screenshot of this if requested.
Imported from legacy forums. Posted by russellcoombes (had 644 views)
This ContextMenu is coming from the control used to edit the cell. When not in edition, your own ContextMenu is shown (the one associated with the cell). When in edition, it is the control’s ContextMenu that is shown.
If you are using the default CellEditorManager (like WinTextBox), it is not possible to override the ContextMenu. However, it is possible using certain other controls, like the .NET TextBox.