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.

Disable right click menu in griddataboundgrid

Thread ID:

Created:

Updated:

Platform:

Replies:

80015 Mar 6,2009 01:55 PM Mar 9,2009 02:25 AM Windows Forms 1
loading
Tags: Tools
Ashes Mukherjee
Asked On March 6, 2009 01:55 PM

How can we disable showing the context menu when you right click on a GridDataBoundGrid object?


Rajadurai C [Syncfusion]
Replied On March 9, 2009 02:25 AM

Hi Ashes,

Thanks for your interest in Syncfusion products.

The contextmenu on rightclick can be prevented from showing by means of handling the following code in MouseDown event in griddataboundgrid.

this.gridDataBoundGrid1.MouseDown += new MouseEventHandler(gridDataBoundGrid1_MouseDown);

void gridDataBoundGrid1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
this.gridDataBoundGrid1.ContextMenuStrip = null;
}
}


Regards,
Rajadurai


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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.

;