Hello,
I have some issues with the MultiColumn ComboBox (in the following just CB) in Visual Studio, i'll show you some code steps:
step 1: init CB
With myCB .ClearTextOnValidation = True .DataBindings.Clear() .BestFitColumns() .ValueMember = "wpno" .DisplayMember = "wpno" .DataSource = myDataset.Tables("myTable") .AutoFilter = True .AutoCompleteMode = AutoCompleteMode.Append Dim compositeFilter As New CompositeFilterDescriptor() Dim selectField1 As New FilterDescriptor("fieldname1", FilterOperator.Contains, "") Dim selectField2 As New FilterDescriptor("fieldname2", FilterOperator.Contains, "") Dim selectField3 As New FilterDescriptor("fieldname3", FilterOperator.Contains, "") compositeFilter.FilterDescriptors.Add(selectField1) compositeFilter.FilterDescriptors.Add(selectField2) compositeFilter.FilterDescriptors.Add(selectField3) compositeFilter.LogicalOperator = FilterLogicalOperator.[Or] .EditorControl.FilterDescriptors.Clear() .EditorControl.FilterDescriptors.Add(compositeFilter) .ValueMember = "wpno" .DisplayMember = "wpno" .DataSource = myDataset.Tables("myTable")End With
step 2: select an entry via the GUI or via
myCB.SelectedIndex = 2works fine
step 3: open another form to edit some values of the selected entry
Me.Enabled = FalseotherForm.Show()
step 4: Edit entry in other form, set a flag and return to first form (containing the CB)
updateEntry(updateField, updateValue)updComboList = TruefirstForm.Enabled = TrueMe.Close()
step 5: reload values for the CB
If updComboList Then updateDataset() updateCB() 'code from step1 CB.Enabled = True CB.SelectedIndex = 2 'doesn't workEnd If
From now on, no change of selection via SelectedIndex or even via the GUI is possible! The CB is still responsive in terms of colors while hovering cells, but no selection is made when I click anywhere on the drop-down table of the CB. This table doesn't close again either.
Do you have any suggestions? Or is there maybe a bug with this MultiColumn ComboBox?
Thanks heaps.
