combobox displays [Namespace].[ClassName]

M

Matt

Here is my code:

lstEditEventTypes.DisplayMember = "Name.Value"
lstEditEventTypes.ValueMember = "ID"
lstEditEventTypes.DataSource = m_EventTypes

m_EventTypes is a collection.

This worked fine until I changed the Name to a propertyholder. So, to
access the name value, I have to use Name.Value. But now my combobox just
displays:

[MyNamespace].[MyClassName]

Thanks.

Matt
 
J

Jon

Put the following in your class

Public Overrides Function ToString() As String

Return VariableToDisplayAsComboboxText

End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top