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
close icon

Disable right click menu in griddataboundgrid

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


1 Reply

RC Rajadurai C Syncfusion Team March 9, 2009 06:25 AM UTC

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


Loader.
Live Chat Icon For mobile
Up arrow icon