简体   繁体   中英

C# Adding Combobox dynamically losing selected items in others Combobox

On a form, I have a default ComboBox, I have another button that allows user to add more ComboBoxes, however, when user adds new combobox dynamically, existing selected value in the default combo box changes, where as idea is however many ComboBoxes are added, every previously added ComboBox would not lose a selection if user has selected anything. Can some one point in the right direction?

Thanks

You are not very clear on your problem, however I would suggest setting a new BindingContext to your Control, before adding it to the form.
Good luck.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM