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

grid grouping control - check box cell

I've got a a simple question:

How to make the check box ignore the mouse click if i click it with the right button (I don't want it to change if I right clicked it)
but still to display the context menu?

A simple example is attached so you can modify it...

cbox.zip

1 Reply

HA haneefm Syncfusion Team June 28, 2007 05:34 PM UTC

Hi Vicko,

You can handle the TableControlCheckBoxClick event and set the e.Inner.Cancel to true whenever right mouse button is clicked. Below are the code snippet

gridGroupingControl1.TableControlCheckBoxClick += new Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCellClickEventHandler(gridGroupingControl1_TableControlCheckBoxClick);

void gridGroupingControl1_TableControlCheckBoxClick(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCellClickEventArgs e)
{
if (e.Inner.MouseEventArgs.Button == MouseButtons.Right)
e.Inner.Cancel = true;
}

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon