$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Data Grid WinForms Control
Create data gird view in C# with modern user interface for your Windows Forms applications
Home > WinForms UI Controls > User Manual > Grid Context Menu in C#

Custom Context Menus of Grid in C#

The Kettic Data Grid Control offers an easy way to build custom context menus in grid view to replace the default menus. When users of the Kettic Grid Control right click the control, the context menu will display, regardless of the grid control element.

Create Custom Context Menu

To create the custom context menu, we need to initialize the items of custom context menus, and then subscribe for the events that you are going to handle to achieve desired behavior. In the process of creating custom context menu, we will need to add the Kettic WinForms.UI.Control namespace to your C# project.

private KetticContextMenu contextMenu;
private void Form1_Load(object sender, EventArgs e)
{
contextMenu = new KetticContextMenu();
KetticMenuItem menuItem1 = new KetticMenuItem("Item 1");
menuItem1.ForeColor = Color.Blue;
menuItem1.Click += new EventHandler(menuItem1_Click);
KetticMenuItem menuItem2 = new KetticMenuItem("Item 2");
menuItem2.Click += new EventHandler(menuItem2_Click);
contextMenu.Items.Add(menuItem1);
contextMenu.Items.Add(menuItem2);
}
When we initialize and populate the menu object with menu items, the menu object will be attached to the Data Grid Control. This requires us subscribe to the ContextMenuOpening event and display the context menu.

void ketticGrid_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e)
{
e.ContextMenu = contextMenu.DropDown;
}

Create Custom Context Menu to GridView in C#

By using the GridView C#.NET component in your Windows Forms application, it is easy to create conditional custom context menus and change GridView default context menu.
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls