开发者

Add Items to a drop down list whose datasource is already set in a Windows Form Application

开发者 https://www.devze.com 2023-03-22 05:00 出处:网络
I have a drop down list whose4 datasoruce is already set, I need to add an ext开发者_如何学Cra item, in webapplications it\'s easy, using Items.Insert(index, newItem). but in windows applications it i

I have a drop down list whose4 datasoruce is already set, I need to add an ext开发者_如何学Cra item, in webapplications it's easy, using Items.Insert(index, newItem). but in windows applications it is not working, any body can help!

Note: I need to add the items without affecting the datasource at all thanks


If your DataSource doesn't have an Add method. You will have to either create your own DataSource (List<...>) or add item iteratively.


If the data source is a dataset or list, try adding items to it and those will appear in the drop down.

0

精彩评论

暂无评论...
验证码 换一张
取 消