【发布时间】:2010-12-09 07:15:52
【问题描述】:
我有一个 ComboBox,我想将一个通用列表绑定到它。谁能明白为什么下面的代码不起作用?绑定源中有数据,但不会填充 ComboBox 数据源。
FillCbxProject(DownloadData Down)
{
BindingSource bindingSource = new BindingSource();
bindingSource.DataSource = Down.ProjectList;
cbxProjectd.DataSource = bindingSource;
}
附带说明:传递一个类的实例是不是很糟糕?
谢谢!
【问题讨论】:
-
你看到了什么?您是否分配了 DisplayMember 属性?
标签: c# winforms data-binding binding