Suppressing and event call
Is there a way of suppressing an event call. I have a check Box when the box is checked checkchanged event is raised and I preform some checks if one of the checks fails I uncheck the checkbox but this creates a call to the event checkchanged. Is there a way of suppressing this second call?
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

patrickRank #4,458 · 342 reputationPosted Jun 25, 2009, 10:04 AM EDT
CheckBox.CheckedChanged+=new System.EventHandler(this.CheckBox_CheckedChanged);
then add this method:
private void CheckBox_CheckedChanged(object sender, EventArgs e)
{
e.handled=true;
}
patrickRank #4,458 · 342 reputationPosted Jun 25, 2009, 8:39 AM EDT
Gordon6 reputationPosted Jun 25, 2009, 9:10 AM EDT