Colleagues,
I have a Public array of type String as data source for a combo box on a Form:
Array's being populated at the start of the program (from INI file), and then assigned as the data source to that combo box:
The problem is: when array is changed (programmatically), e.g. an element is added, the combo box's content remains the same.
In other programming language, I could
and then re-connect it to the updated array, but in VB .NET I got the following error:
I tried just
and it didn't help.
What am I doing wrong?
TIA!
I have a Public array of type String as data source for a combo box on a Form:
Array's being populated at the start of the program (from INI file), and then assigned as the data source to that combo box:
Code:
cboSoughtStrings.DataSource = gaSoughtStrings
The problem is: when array is changed (programmatically), e.g. an element is added, the combo box's content remains the same.
In other programming language, I could
Code:
cboMyComboBox.DataSource = "" '
and then re-connect it to the updated array, but in VB .NET I got the following error:
VS 2019 said:$exception {"Complex DataBinding accepts as a data source either an IList or an IListSource."} System.ArgumentException
I tried just
Code:
cboSoughtStrings.Refresh()
What am I doing wrong?
TIA!