在Windows应用程序中如何与数据源绑定后将新项目添加到ComboBox中? [英] How to add new Item into ComboBox after binding with a Datasource?in windows applicatio
本文介绍了在Windows应用程序中如何与数据源绑定后将新项目添加到ComboBox中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
databind();不支持Windows窗体应用程序
databind();is not suported into windows form application
推荐答案
^ ]
从Windows窗体组合框中添加和删除项目 [
Bind a Windows Forms ComboBox [^]
Add and Remove Items from a Windows Forms ComboBox[^]
有了胜利表格,您就不是'不需要调用DataBind方法,一旦设置了DataSource,它将绑定.
至于删除和添加,如果要设置数据源,则无法完成此操作,如果您想在以后添加和删除项目,则需要遍历列表以加载组合框
With win forms you aren''t required to call a DataBind method, as soon as the DataSource is set it will bind.
As for removing and adding, this can''t be done if you setting the dataSource you''ll need to loop through you list to load the Combobox if you want to add and remove items from it at a later stage
这篇关于在Windows应用程序中如何与数据源绑定后将新项目添加到ComboBox中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文