Home All Groups Group Topic Archive Search About

Binding to a combobox w/ hashtable...

Author
28 Aug 2006 10:30 PM
johnb41
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

Author
29 Aug 2006 5:50 AM
Cor Ligthert [MVP]
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

Show quoteHide quote
"johnb41" <jsbuchm***@gmail.com> schreef in bericht
news:1156804250.623759.36860@p79g2000cwp.googlegroups.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
>