开发者

Winforms ComboBox Bug?

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 lbSelectedG开发者_如何转开发roups, in which data comes from lbAvailableGroups, it shows {value=value, key=key}.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜