combobox displays [Namespace].[ClassName]

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matt

    #1

    combobox displays [Namespace].[ClassName]

    Here is my code:

    lstEditEventTyp es.DisplayMembe r = "Name.Value "
    lstEditEventTyp es.ValueMember = "ID"
    lstEditEventTyp es.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


  • Jon

    #2
    Re: combobox displays [Namespace].[ClassName]

    Put the following in your class

    Public Overrides Function ToString() As String

    Return VariableToDispl ayAsComboboxTex t

    End Function




    "Matt" <matt.arens@nos pamremovethis-gmail.com> wrote in message
    news:%23m10HvPK GHA.744@TK2MSFT NGP09.phx.gbl.. .[color=blue]
    > Here is my code:
    >
    > lstEditEventTyp es.DisplayMembe r = "Name.Value "
    > lstEditEventTyp es.ValueMember = "ID"
    > lstEditEventTyp es.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
    >[/color]


    Comment

    Working...