Solved

Set Combobox datasource to a dictionary

Posted on 2007-11-28
1
3,541 Views
Last Modified: 2008-04-14
Is there a way to set the datasource of a combobox to a dictionary (System.Collections.Generic.Dictionary).  I'm not sure what to put for the ValueMember and DisplayMember properties to make this work.  
0
Comment
Question by:vb9666
1 Comment
 
LVL 24

Accepted Solution

by:
Jeff Certain earned 125 total points
ID: 20365920
I found this a while ago... it should be what you're after:
http://www.madprops.org/cs/blogs/mabster/archive/2005/10/05/Bind-a-ComboBox-to-a-generic-Dictionary.aspx

Basically, you use "Value" and "Key" as the members.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SLMGR Switches Are Not Working On KMS Host 3 94
I need help converting a bitmap to an image in VB.Net 1 32
vb.net and creating a class 5 17
location of a form 2 14
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question