databind hashtable

  • Thread starter Thread starter Ryan Moore
  • Start date Start date
R

Ryan Moore

I am trying to use a hashtable as the datasource for a listbox and am
running into an error:

{"Complex DataBinding accepts as a data source either an IList or an
IListSource" }

what am I doing wrong? do I need to cast the hashtable in order to bind it?

thnx
 
Ryan,

Just as it says, the Hashtable doesn't implement the IList interface.
However, you can get the collections of keys as well as the collection of
values and those implement IList (arrays are returned), and then you can
bind to those.

Hope this helps.
 
Back
Top