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.
Syncfusion Feedback

grid grouping control - check box cell

Thread ID:

Created:

Updated:

Platform:

Replies:

63115 Jun 28,2007 07:52 AM Jun 28,2007 01:34 PM Windows Forms 1
loading
Tags: GridControl
Vicko Hazdovac
Asked On June 28, 2007 07:52 AM

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

haneefm [Syncfusion]
Replied On June 28, 2007 01:34 PM

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

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.

Warning Icon 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.Close Icon

;