Answer the question
In order to leave comments, you need to log in
How to display a field in a combobox?
There is a station object. I pass it to combobox1.Items.Add (station). Now MetroLibrary.Station is displayed, but I would like the Title field of the station object to be displayed. How to do this?
Answer the question
In order to leave comments, you need to log in
first option:
if you can override the ToString() method of Station, then override it so that this method returns Title.
second option:
set the comboBox1 property to DrawMode other than Normal and use the DrawItem event handler to display whatever you want.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question