D
Demetri
I have a structure called SelectionItem and it has two properties - Key&
Value. I also have a combobox with the DisplayMember = Value and ValueMember
= Key. I have the following simple code:
List<SelectionItem> list = new List<SelectionItem>();
list.Add(new SelectionItem(0, "Item1"));
list.Add(new SelectionItem(1, "Item2"));
myCboBox.DataSource = list;
My issue is that during runtime the cbobox doesn't have Item1, Item2 as
possible values. Rather it has the type name of the object (i.e.
MyApp.UI.Forms.SelectionItem) for each item.
What am I doing wrong?
Value. I also have a combobox with the DisplayMember = Value and ValueMember
= Key. I have the following simple code:
List<SelectionItem> list = new List<SelectionItem>();
list.Add(new SelectionItem(0, "Item1"));
list.Add(new SelectionItem(1, "Item2"));
myCboBox.DataSource = list;
My issue is that during runtime the cbobox doesn't have Item1, Item2 as
possible values. Rather it has the type name of the object (i.e.
MyApp.UI.Forms.SelectionItem) for each item.
What am I doing wrong?