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.

How to use your own context menu along with the FieldChooser option?

Description:

By default, the FieldChooser context menu is displayed when you right-click on the ColumnHeadercell of the Grid but it is not displayed when you right-click on the Grid cells.

C#

 

VB

 

When you try to use your own context menu along with the FieldChooser context menu item, it overrides the FieldChooser context menu.

Solution:

The context menu that is displaying when you right-click the ColumnHeadercell can be restricted by the TableControlMouseDown event. By using this event, you can customize ContextMenuStrip to display only in the cells other than the header cells.

C#

 

VB

 

The following screenshot displays the context menu.

C:\Users\venkatesh s\Desktop\chooser.png

 

Sample links:

C#: Contextmenu

VB: Contextmenu

Article ID: Published Date: Last Revised Date: Platform: Control:
4672 04/22/2015 04/22/2015 Windows Forms GridGroupingControl
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.