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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

CheckBoxClick event

Thread ID:





70810 Jan 2,2008 06:47 PM UTC Jan 3,2008 04:06 PM UTC WinForms 2
Tags: GridControl
Feng Sha
Asked On January 2, 2008 06:47 PM UTC


I'm handling the CheckBoxClick event for a checkbox cell on a gridControl.
But if I make the checkbox cell the current cell and press the spacebar, the checkbox will be selected/deseleted as well. However,
the CheckBoxClick doesn't get raised in this case.

Basically, I need to raise and event whenever the checkbox in the cell is selected/deselected. Can you please?



haneefm [Syncfusion]
Replied On January 2, 2008 08:32 PM UTC

Hi Frank,

You need to handle the CurrentCellChanged event to check for the current cell state/value change for the CheckBox cell.


You can catch Space key at CurrentCellKeyPress handler of the grid and raise the checkbox click by using the RaiseCheckBoxClick method. Below are the codes:

void gridControl1_CurrentCellKeyPress(object sender, KeyPressEventArgs e)
if (e.KeyChar == ' ')
GridControl grid = sender as GridControl;
GridCurrentCell cc = grid.CurrentCell;
Point ptCellLocation = cc.Renderer.GetCellBoundsCore(cc.RowIndex,cc.ColIndex).Location;
ptCellLocation.Offset( 1,1);
grid.RaiseCheckBoxClick(cc.RowIndex, cc.ColIndex, new MouseEventArgs(MouseButtons.Left, 1, ptCellLocation.X,ptCellLocation.Y,1 ));


Best regards,

Feng Sha
Replied On January 3, 2008 04:06 PM UTC

Good, CurrentCellChanged works.
Thank you,


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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