PC Review


Reply
Thread Tools Rate Thread

ComboBox and ValueMember

 
 
Phill. W
Guest
Posts: n/a
 
      14th May 2004
Am I missing something here?

I have a simple class that exposes String properties called "Key"
and "Description".

I have a Control inherited from a ComboBox, into whose Items
collection I've added instances of the above class. The [inherited]
ComboBox's ValueMember is set to "Key" and its DisplayMember
to "Description".

Should the "text" part of the ComboBox display only the value
retrieved through the ValueMember "mechanism" and, if not, how
can(?) I persuade it to?

TIA,
Phill W.


 
Reply With Quote
 
 
 
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      14th May 2004
Hi,

The Displaymember is show in the combobox.

Ken
---------------
"Phill. W" <P.A.Ward@o-p-e-n-.-a-c-.-u-k> wrote in message
news:c8241u$2ie$(E-Mail Removed)...
> Am I missing something here?
>
> I have a simple class that exposes String properties called "Key"
> and "Description".
>
> I have a Control inherited from a ComboBox, into whose Items
> collection I've added instances of the above class. The [inherited]
> ComboBox's ValueMember is set to "Key" and its DisplayMember
> to "Description".
>
> Should the "text" part of the ComboBox display only the value
> retrieved through the ValueMember "mechanism" and, if not, how
> can(?) I persuade it to?
>
> TIA,
> Phill W.
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combobox valuemember Cdude Microsoft C# .NET 2 19th Jun 2008 09:16 AM
ComboBox ValueMember = Null??? Can't set ValueMember! Spam Catcher Microsoft VB .NET 5 13th Jun 2007 03:50 PM
valuemember and displaymember for a combobox Sam Microsoft VB .NET 2 19th Apr 2005 12:31 PM
ComboBox ValueMember Jim Heavey Microsoft C# .NET 1 2nd Mar 2004 03:48 PM
Re: ComboBox - ValueMember Ahto Truu Microsoft Dot NET Framework Forms 0 14th Jul 2003 02:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:40 AM.