问题
I have a project where we are loading a multi-select listbox from a collection of objects.
I have another entity object that has a collection that I want to bind to SelectedItems somehow.
Is there any way to do this using object binding sources or some kind of binding source without writing code? Sure I can loop through the collection and get the selected items but I'd prefer to do it more cleanly with windows data-binding.
Is this possible?
回答1:
Unfortunately you can't bind the SelectedItems (or CheckedItems in CheckedListBox)... I can't tell how many times I wished it were possible !
来源:https://stackoverflow.com/questions/1233317/two-way-binding-on-multi-select-winforms-listbox