C#
我有ToolStripComboBox控制。有办法将这个ToolStripComboBox绑定到列表中吗?
发布于 2011-05-01 14:31:07
试一试
List<string> items = new List<string>{"item1", "item2", "item3"};
toolStripComboBox1.ComboBox.DataSource = items;发布于 2014-06-10 12:19:51
还可能需要将ComboBox.BindingContext设置为Form的BindingContext属性:
toolStripComboBox1.ComboBox.BindingContext = this.BindingContext;发布于 2014-10-02 16:35:02
如果您发现了这一点,并且希望动态地使用ComboBox,则需要确保您在数据源实现IBindingList时设置的数据结构,其中一个这样的结构是BindingList(T)
https://stackoverflow.com/questions/5848982
复制相似问题