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.
Up arrow icon