G
Grok
Is this a feature of ListBox that when using a DataSource, the
SelectedItem acts different?
Added ListBox1 and ListBox2 to a form.
ListBox1 is bound to a DataSource where DisplayedMember=name and
ValueMember=id from the table.
ListBox2 filled by AddRange(New String() {"One", "Two", "Three",
"Four", "Five"})
ListBox2.SelectedItem = "Three"
selected the item "Three" in the Items.
but ListBox1.SelectedItem = "(name of any item in the list)"
does not cause any item to be selected.
How does one use .SelectedItem = "value" with data-bound list
controls?
SelectedItem acts different?
Added ListBox1 and ListBox2 to a form.
ListBox1 is bound to a DataSource where DisplayedMember=name and
ValueMember=id from the table.
ListBox2 filled by AddRange(New String() {"One", "Two", "Three",
"Four", "Five"})
ListBox2.SelectedItem = "Three"
selected the item "Three" in the Items.
but ListBox1.SelectedItem = "(name of any item in the list)"
does not cause any item to be selected.
How does one use .SelectedItem = "value" with data-bound list
controls?