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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to enable Custom Context Menu in GridDataControl

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

Article ID: Published Date: Last Revised Date: Platform: Control: .NET Framework: Product Version:
2422 08/06/2014 08/06/2014 WPF GridDataControl 4
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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