Problem on combobox

Rachita

New member
Joined
Sep 20, 2008
Messages
4
Programming Experience
Beginner
Hi
Can anyone tell how to bind combo box to a class. Actually i need to do it in 3 tier architecture.
 
I don't think you can bind a combo box to a class. Most(I think all) controls can only be bound to lists. Meaning if in your class you have a property of any type that implements Collections.IEnumerable.
 
You could also make your class implement the IEnumerable. (Should that be the IList interface? Check what interface the combo box datasource expects to receive.)

Any object that implements the correct interface will be accepted.


You will have to fill out the code to the interface methods and properties for yourself. I have no idea how easy it is to cock up the control if you implement the interface incorrectly.
 
Back
Top