.NET 复杂的 DataBinding 接受 IList 或 IListSource 作为数据源 Kevin

问题描述: 本来是想用dictionary来绑定combox的,结果给报了这么一个错。

解决方法:在网上查了一下,

Code
comboBoxPlanResult.DataSource =new BindingSource(o,null);
comboBoxPlanResult.DisplayMember
="Key";
comboBoxPlanResult.ValueMember
="Value"
;

即可解决该问题。

参考:http://www.cnblogs.com/winzheng/archive/2008/12/02/1345669.html
原文地址:https://www.cnblogs.com/kfx2007/p/2484646.html