Solved

Set Combobox datasource to a dictionary

Posted on 2007-11-28
1
3,543 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MailAddress in vb 4 35
ASP.NET (VB) return a record 2 51
Get sourcecode path 14 46
vb.net Deserialize JSON output - YouTube API (With somewhat of a working example included) 21 42
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

679 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