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

Checkbox cells and CheckChanged Event

Thread ID:





41167 Feb 23,2006 04:40 PM UTC Feb 24,2006 03:10 PM UTC WinForms 3
Tags: GridControl
Maxim Software Systems
Asked On February 23, 2006 04:40 PM UTC

Is there a way to handle the CheckChanged event of a Checkbox cell? I can''t seem to find any event that will let me do this. Even the CellClick event doesn''t appear to fire when I click on a Checkbox type cell.

Administrator [Syncfusion]
Replied On February 24, 2006 04:55 AM UTC

Hi Don, The CheckBoxClick, CurrentCellChanged and CellsChanged are events that get triggered when there is change in the check box. The CheckBoxClick event will get fired only when the checkbox is clicked. The other two events will get fired, when there is change of any type in the cells . // On Mouse Click on CheckBox only private void gridControl1_CheckBoxClick(object sender, Syncfusion.Windows.Forms.Grid.GridCellClickEventArgs e) { Console.WriteLine("CheckBoxClick"); } // Change in CurrentCell ( Check / UnCheck ) private void gridControl1_CurrentCellChanged(object sender, System.EventArgs e) { GridCurrentCell cc = this.gridControl1.CurrentCell; if(cc.Renderer.StyleInfo.CellType == "CheckBox") Console.WriteLine(this.gridControl1[cc.RowIndex, cc.ColIndex].Text); } // Change in a cell / group of cells ( Check / UnCheck ) private void gridControl1_CellsChanged(object sender, Syncfusion.Windows.Forms.Grid.GridCellsChangedEventArgs e) { Console.WriteLine("CellsChanged"); } Best Regards, Madhan.

Maxim Software Systems
Replied On February 24, 2006 02:33 PM UTC

I can''t believe I didn''t see the CheckBoxClick event.

Maxim Software Systems
Replied On February 24, 2006 03:10 PM UTC

Just a side note here: The CurrentCellChanging event only fires on the first click on not on any subsequent clicks (as long as the cell remains the current cell), which could let the user easily bypass any restrictions. On the other hand, the CurrentCellChanged event fires reliably enough, but it doesn''t allow for the click operation to be cancelled. The CheckBoxClick event fires before the grid''s CurrentCell property is updated, so you must access the grid cell''s value directly, meaning you''ll be dealing with the opposite value that the cell''s checkbox was changed to. Just FYI for future readers who come across this issue.


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