Home Forums WinForms controls Xceed Grid for WinForms Suspend Eventhandler? Reply To: Suspend Eventhandler?

User (Old forums)
Member
Post count: 23064

What I do in cases like this: I have a boolean variable suspendEvents that I set to true before the update, and to false after the update. Inside the eventhandler I check if this variable is false. Like this:<code>bool suspendEvents;

suspendEvents = true;
// do the update
suspendEvents = false;</code>
Inside the eventhandler:<code>if (!suspendEvents) {
// perform functionality
}</code>

Imported from legacy forums. Posted by Tommy (had 2882 views)