相关疑难解决方法(0)

将通用List <string>绑定到ComboBox

我有一个ComboBox,我想绑定一个通用的List.任何人都可以看到为什么下面的代码不起作用?绑定源中包含数据,但它不会填充ComboBox数据源.

FillCbxProject(DownloadData Down)
{
  BindingSource bindingSource = new BindingSource();
  bindingSource.DataSource = Down.ProjectList;
  cbxProjectd.DataSource = bindingSource;
}
Run Code Online (Sandbox Code Playgroud)

旁注:传递一个类的实例是不是很糟糕?

谢谢!

c# data-binding binding winforms

17
推荐指数
2
解决办法
8万
查看次数

标签 统计

binding ×1

c# ×1

data-binding ×1

winforms ×1