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

Canceling checkbox click event in GridGroupingControl

I have a GGC that is bound to a bindinglist of business objects. On one of the checkbox columns, I have a pop up to warn the user from actually changing the value of the check box. Unless the user hits OK on the popup, the value of the checkbox will change. Otherwise, if the user hits cancel on the popup, it should not update. How do I do this?
Thanks


1 Reply

SR SubhaSheela R Syncfusion Team May 12, 2008 01:01 PM UTC

Hi Ha,

Thanks for your interest in Syncfusion products.

You can cancel the check box click event in GridGrouping Control by handling the TableControlCurrentCellChanging event. Below is the code snippet:


private void gridGroupingControl1_TableControlCurrentCellChanging(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCancelEventArgs e)
{
if (MessageBox.Show("You are about to modify . Do you want to modify?",
"Modify ..", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
this.gridGroupingControl1.TableControl.CurrentCell.BeginEdit();
}
else
e.Inner.Cancel = true;
}


Here is the sample:

'>http://websamples.syncfusion.com/samples/Grid.Windows/Grid_WF_GGCCheckBox_F73464/main.htm">
http://websamples.syncfusion.com/samples/Grid.Windows/Grid_WF_GGCCheckBox_F73464/main.htm

Please let me know if it helps.

Regards,
Subhasheela R





Loader.
Live Chat Icon For mobile
Up arrow icon