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.

Canceling checkbox click event in GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

73464 May 7,2008 04:59 PM May 12,2008 09:01 AM Windows Forms 1
loading
Tags: GridControl
Ha Tran
Asked On May 7, 2008 04:59 PM

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


SubhaSheela R [Syncfusion]
Replied On May 12, 2008 09:01 AM

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





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.

;