disable event c# code example
Example 1: c# how to disable a event
bool dontRunHandler;
void Handler(object sender, EventArgs e) {
if (dontRunHandler) return;
// handler body...
}
Example 2: c# how to disable a event
object.Event -= new EventHandlerType(your_Method);
// Change your cell value
object.Event += new EventHandlerType(your_Method);