Binding a generic List to a ComboBox

后端 未结 6 1567
轻奢々
轻奢々 2020-12-16 13:07

I have a ComboBox and I want to bind a generic List to it. Can anyone see why the code below won\'t work? The binding source has data in it, but it won\'t fill the ComboBox

6条回答
  •  无人及你
    2020-12-16 13:48

    BindingSource bs = new BindingSource();
    bs.DataSource = getprojectname();
    comboBox1 = new ComboBox();
    comboBox1.DataSource = bs;
    

提交回复
热议问题