DarkConsultant
Programmer
Hi,
I am binding a combobox to a List(Of KeyValuePair(Of Integer,String)) using the code ...
Contacts is my list of kvp.
With cmbContacts
.Items.Clear
.DisplayMember = "Value"
.ValueMember = "Key"
.DataSource = New BindingSource(Contacts, Nothing)
End With
This works OK, populating the combobox with all of the KVP values.
However, I am not sure of the second BindingSource arg of Nothing (this is how it was on the example I found on the web).
When my code hits the BindingSource command I get three System.ArgumentNullException's. Although these do not affect the workings I am at a lost to explain them and would like to eradicate them.
Any ideas?
TIA
David
DarkConsultant
Live long and prosper \\//
I am binding a combobox to a List(Of KeyValuePair(Of Integer,String)) using the code ...
Contacts is my list of kvp.
With cmbContacts
.Items.Clear
.DisplayMember = "Value"
.ValueMember = "Key"
.DataSource = New BindingSource(Contacts, Nothing)
End With
This works OK, populating the combobox with all of the KVP values.
However, I am not sure of the second BindingSource arg of Nothing (this is how it was on the example I found on the web).
When my code hits the BindingSource command I get three System.ArgumentNullException's. Although these do not affect the workings I am at a lost to explain them and would like to eradicate them.
Any ideas?
TIA
David
DarkConsultant
Live long and prosper \\//