473,408 Members | 1,904 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

combobox displays [Namespace].[ClassName]

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
Feb 3 '06 #1
1 1391
Jon
Put the following in your class

Public Overrides Function ToString() As String

Return VariableToDisplayAsComboboxText

End Function


"Matt" <ma********@nospamremovethis-gmail.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
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

Feb 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Wayne Wengert | last post by:
I am trying to populate a combobox with a lisy of items. I want the 1st item to be "Make a Selection" and the following items will be names from a table in my DB (See code below). When I run the...
1
by: Oliver Hoehle | last post by:
Hello! This ist the source-code for an editable combobox implemented with HTML,CSS and Javascript. I have tested it with IE and Mozilla. But I don't know, if it will work in other browsers...
3
by: PeterZ | last post by:
G'day, After doing much searching and pinching bits of ideas from here there and everywhere I came up with a fairly 'clean' solution of including a comboBox into a dataGrid column. You can...
5
by: DS | last post by:
How do I go about binding a "struct" datatype to a comboBox? When I bind it by means of the DataSource, it doesn't give any error, but the comboBox just gets populated with...
0
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
6
by: dbuchanan | last post by:
VS2005 I've been reading all the help I can on the topic (MSDN, other) but I can't make sense of this. Desired behavior; The user is to choose from the displayed list of the databound combobox...
1
by: mrpubnight | last post by:
Hi everyone, just hoping to get some opinions from those who have been using/creating namespaces for a while. Currently I have our namespace as follows: CompanyName.Location.Client.Class So...
8
by: =?Utf-8?B?RyBIdXN0aXM=?= | last post by:
This is the 2nd time posting so sorry for duplications. I am using VB.NT 2005 & a standard Combobox. I've been wracking my brain over this problem for a over a month & cannot seem to find a way to...
5
by: latortugamorada | last post by:
I have searched high and low for a solution to this incredibly vexing problem and am at the brink of insanity/desperation/severe upsettedness. I have a problem with ComboBoxes in .NET. Once I click...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.