This topic discusses about various operations that require handling at the grid level.
Context menus can be helpful to user as they provide shortcuts for actions that are frequently used. In FlexGrid, there can be two scenarios to display a context menu.
To display context menu when grid is in non-edit mode, you need to create an instance of ContextMenuStrip control, add the menu items and assign the instance to ContextMenuStrip property of the Control class.
Refer to the code below to see how to display a context menu in WinForms FlexGrid in non-edit mode.
To display context menu in edit mode, you need to display the context menu on editor by using StartEdit event of the C1FlexGrid class. In the StartEdit event, instantiate the editor and the ContextMenuStrip, add menu items and then assign it to ContextMenuStrip property of the editor.
Use the code below to display context menu in WinForms FlexGrid in edit mode.