Description:
I do not wish my users to see the standard <Copy - Paste> menu. How can I replace it with my own?
Answer:
This feature can be implemented using the ShownEditor event of the GridView object. All you need to do is to access the GridView's ActiveEditor property and set its ContextMenu property value to your own ContextMenu:
C#private void gridView1_ShownEditor(object sender, System.EventArgs e) {
DevExpress.XtraGrid.Views.Grid.GridView view = sender as DevExpress.XtraGrid.Views.Grid.GridView;
contextMenu1.MenuItems.Add(contextMenu1.MenuItems.Count, new MenuItem("SomeText"));
view.ActiveEditor.ContextMenu = contextMenu1;
}
We also recommend that you refer to the following KB article where we described the concept of Popup Menus in greater detail:
DevExpress WinForms Cheat Sheets - Context Menus