c# combobox binding to list of objects

Viewed 57576

Is it possible to bind a ComboBox to a list of objects, but have the selectedvalue property point to the object, not a property of the object?

I only ask because we have some Business Objects which have references to other objects - such as a 'Year' object. That year object may need to be switched out for another year object.


Only solution I can come up with is to have another class with a single property, in this case pointing to a year object. then bind the combobox to a List of these and set both the display and value members to the single property.

But doing that for any 'lookups' we have seems like a bit of a pain??

2 Answers
Related