We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to enable Custom Context Menu in GridDataControl

Platform: WPF |
Control: GridDataControl |
.NET Framework: 4 |
Product Version:

ContextMenu displays a list of menu items added to it and performs the specified action when you click on the menu items. In GridDataControl, you can enable the ContextMenu by setting EnableContextMenu property as ‘True’. The ContextMenu for Headers, Records and GroupCaption area are enabled with default MenuItems. You can customize these context menu items using theContextMenuOptions” property.


GridDataControl contain the following ContextMenu options.


Using Default options we can enable the default context menu items only.


Using Custom context menu options we can create the context menu items based on our requirement.


Using CustomWithDefault option we can add context menu items to the default context menu items.



You can customize the HeaderContextMenuItems, GroupHeaderContextMenuItems and RecordContextMenuItems by adding the new menu items to the collection.

For example, you can create menu items for records like “Add”, ”Remove”,” Update” as shown in the following code sample.





The following screenshot illustrates the output for customizing the ContextMenu based on cell value using the QueryContextMenuInfo event in GridDataControl.


D:\Syncfusion\Issues\2014 Volume 2\KB Issues\KB Images\Customization based on cell value.png

2X faster development

The ultimate WPF UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile