0

I would like to ask how can I disable the combobox selectionchange event from triggering when I begin to edit my form.

The problem here is that when I edit my form, the selectionchange also triggers which I believe causes my comboboxes to have a null value.

Please help.

Thank you.

1 Answers1

0

You can unsubscribe the Combobox Selection changed event and resubscribe it from code behind.

ComboBox comboBox = new  ComboBox();

Subscribe to SelectedIndexChanged event

comboBox.SelectedIndexChanged += comboBox_SelectedIndexChanged;

Use below code to unsubscribe the SelectedIndexChanged event

comboBox.SelectedIndexChanged -= comboBox_SelectedIndexChanged;

disable or cancel combobox SelectedIndexChanged event with code?

Community
  • 1
  • 1
Ramashankar
  • 1,598
  • 10
  • 14