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.

Checkbox cells and CheckChanged Event

Thread ID:

Created:

Updated:

Platform:

Replies:

41167 Feb 23,2006 11:40 AM Feb 24,2006 10:10 AM Windows Forms 3
loading
Tags: GridControl
Maxim Software Systems
Asked On February 23, 2006 11:40 AM

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 23, 2006 11:55 PM

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 09:33 AM

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

Maxim Software Systems
Replied On February 24, 2006 10:10 AM

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.

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.

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.

;