B
Brett Romero
When using the .Add() method of a combo box, how does it know which
element in my object is the key and which is the value?
Say my object looks like this:
object1.field1 = "2";
object1.field2 = "Number2";
and I do:
combobox1.Items.Add(object1);
I'd like field2 displayed in the combo box and then some way to
reference its corresponding value. Will I need to create a look up
table to acheive this because field2 is all that will ever be returned
by the combo?
DataSource() won't be used here.
Thanks,
Brett
element in my object is the key and which is the value?
Say my object looks like this:
object1.field1 = "2";
object1.field2 = "Number2";
and I do:
combobox1.Items.Add(object1);
I'd like field2 displayed in the combo box and then some way to
reference its corresponding value. Will I need to create a look up
table to acheive this because field2 is all that will ever be returned
by the combo?
DataSource() won't be used here.
Thanks,
Brett