tags:

views:

36

answers:

1

Winforms ComboBox Shows {value=value, key=key} even if I already set the DisplayMember and ValueMember. Is this a known bug?

I have 2 Comboboxes, lbSelectedGroups and lbAvailableGroups, both of them are bound to List<Role> and List<UserRole>, respectively, through a BindingList.

Both of them will be populated in the constructor, but usually only lbAvailableGroups contains data. When I try to add an item(onclick) on lbSelectedGroups, in which data comes from lbAvailableGroups, it shows {value=value, key=key}.

+1  A: 

It looks to me like your list contains KeyValuePair collection (probably came from some dictionary) instead of UserRole objects.

Hugo Riley