C# Winforms:
For a quick DEMO application:
“Saving” doesn’t need to be a real Save, just an InMemory save is good enough.
I defined a hard-coded list of some items. I will fill up a Combobox with them.
I also have a hard-coded list of items in a spreadsheet or a listview, with checkboxes next to each item.
So User picks an item from the combobox and selects some items from that spreadsheet or listview, click a Save button and it will save that This item of the combobox is associated to those selected items of that spreadsheet or listview…
Question: What is a good structure that can keep the relationship between the item in the combobox with the items seleted for it from spreadsheet or listview –
I’m not sure if I really understand your question, but I suppose you want to store one to many relationship. You can use some collection like generic list
Then you can create BindingSource, fill it with values (set its DataSource to your list of items) and finally set combobox’s DataSource to binding source. Note that events should be implemented on bindingsource side.