OK, the problem is that the RemoveBinding() method in the BusinessLayer class cannot force the text back to String.Empty because none of the items in the data source matches that string.
So, I've modified the RemoveBinding() method to handle the situation better. Your options are:
1) Manually call this.comboBox1.SelectedIndex = 0; when you call bo.Clear();
2) Change the BusinessLayer.vb source code and recompile it:
Private Sub RemoveBinding(ByVal ControlToRefresh As Control, ByVal PropertyName As String) '-- Establish locals Dim loPropInfo As PropertyInfo '-- Check to see if the bindings have already been removed If ControlToRefresh.DataBindings.Count > 0 Then '-- If there are data bindings, but no data, then clear the data bindings to prevent errors ControlToRefresh.DataBindings.Clear() '-- Set the property value Dim combo As System.Windows.Forms.ComboBox = TryCast(ControlToRefresh, System.Windows.Forms.ComboBox) If combo IsNot Nothing Then '-- We need to clear the combo box '-- First try to set the text on the combo box combo.Text = String.Empty '-- If the text could not be set, then either clear the selected value or set to the top index if it has a data source If Not String.IsNullOrEmpty(combo.Text) Then If combo.DataSource Is Nothing Then '-- Clear the selected value combo.SelectedValue = Nothing ElseIf combo.Items.Count > 0 Then '-- Set to the top index combo.SelectedIndex = 0 End If End If Else '-- Get the property info loPropInfo = TypePropertyCache.GetPropertyInfo(ControlToRefresh.GetType(), PropertyName) '-- Clear out the value loPropInfo.SetValue(ControlToRefresh, GetSystemTypeDefaultValue(loPropInfo.PropertyType), Nothing) End If End If End Sub
You can replace the whole RemoveBinding() method with that. The BusinessLayer.vb file is in the MicroFour StrataFrame Business project. The code starts on line 3535.