How do I prevent code from executing in the SelectedValueChange event of a combobox when the combobox is being loaded for the first time? I need the code to execute when the user has selected a new value.
How do I prevent code from executing in the SelectedValueChange event of a combobox
Share
You have a few options.
Rather than letting the designer hookup the event handler you can do it yourself after loading
You can set a flag in your application for ‘loading’ and put code inside your SelectedValueChange event to check !loading before continuing.
Personally I would just add the handler after load if it is causing issues.