473,320 Members | 2,088 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,320 software developers and data experts.

Binding to a combobox w/ hashtable...

I have some data in a hashtable, and i need to bind it to a combobox.
I know it's impossible to bind a hashtable to a combobox. I need to
"bind" it so the combobox gets a DISPLAYMEMBER and a VALUEMEMBER. I
can't supply a valuemember by simply iterating through a hashtable and
adding items to a combobox.

How else can i get the same effect? What's the best way? If not a
hashtable, what type of object should I use? (i'm currently using a
hashtable because i need the key/value pair support that it has)

Thanks everyone for the help!

John

Aug 28 '06 #1
1 4050
John,

I don't know this because I would direct use a datatable.

All find options in a hashtable are at least as well in a datatable
(although the key does not have to be always unique if you do not set that).

Cor

"johnb41" <js********@gmail.comschreef in bericht
news:11*********************@p79g2000cwp.googlegro ups.com...
>I have some data in a hashtable, and i need to bind it to a combobox.
I know it's impossible to bind a hashtable to a combobox. I need to
"bind" it so the combobox gets a DISPLAYMEMBER and a VALUEMEMBER. I
can't supply a valuemember by simply iterating through a hashtable and
adding items to a combobox.

How else can i get the same effect? What's the best way? If not a
hashtable, what type of object should I use? (i'm currently using a
hashtable because i need the key/value pair support that it has)

Thanks everyone for the help!

John

Aug 29 '06 #2

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

Similar topics

6
by: Omar | last post by:
When I try to databind my comboBox (specifically field "emplcode") to a filled dataset , the contents of the comboBox displays a bunch of "System.Data.DataRowView". I assume the amount of times...
1
by: Jim Heavey | last post by:
You apparently can bind a HashTable to a ComboBox? How do you set the ValueMember and DisplayMeneber?
3
by: Nikolay Petrov | last post by:
I have a Combo box, binded to a dataset With cmbCompany .DataSource = dsSpecContact .DisplayMember = "Companies.CompanyName" .ValueMember = "Companies.CompanyID" End With What I want is to...
1
by: Bruce | last post by:
Hi, there, I meet a problem about comboBox binding. -------------------- Database: Northwind Tables: 1) Products 2) Categories I create a form (named "form1") to edit the record from...
0
by: Michael C# | last post by:
I have found a few samples of using a combobox in a Datagrid on the Web (Windows Forms). While these examples work well for what they do, I need more functionality, and I'd like some advice on the...
0
by: JSantora | last post by:
Essentially, InsertAT is broken! For the past couple of hours, I've been getting this "Parameter name: '-2147483550' is not a valid value for 'index'." error. Apparently, its caused by having...
3
by: amber | last post by:
Hello, I have 6 comboboxes, that I thought I could bind to the same datasource, and have them display different 'selectedvalue's', but apparently I can't... My code is as follows: dim drv as...
3
by: Simon Tamman | last post by:
I've come across an interesting bug. I have workarounds but i'd like to know the root of the problem. I've stripped it down into a short file and hope someone might have an idea about what's going...
3
by: =?Utf-8?B?Sm9obiBCdW5keQ==?= | last post by:
New to databinding in vs2005, I always did it manually in 2003. I have no problem loading comboboxes, and a change in that combobox changes the data in the textboxes but I can not figure out a way...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.