I have a NVL combobox that is setup like this:
this.docTypeNVLComboBox.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.docBindingSource, "DocTypeID", true));When I create a new document, as I have no default value, the combo has no selected item and shows the red icon from the error provider. If I enter the combo box it behaves as the La Brea tar pit and doesn't allow me to leave until I select an item.
If I come back and type garbage or just delete every character, when I try to leave it lets me go away, although it doesn't change the databindings. If I change anything else in the form, that combobox re-shows the last selected item.
On the other hand, if I come back, change the selected item to another item and after that type garbage or delete every character, then it shows me the red icon and behaves like a tar pit again.
Of course I can solve the problem with the binding Parse and Format handlers. But that means to much coding.
Is there a way (meaning property) to make the combobox always show the red icon when there is no valid item selected?
Copyright (c) Marimer LLC