We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Binding Hashtable to GridDataBoundGrid

Can I bind (datasource=) a Hasttable to a databoundgrid?
If so how? I tried and got the following exception:
BadDataSourceForComplexBinding

btw - I tried both the Hashtable as well as Hashtable.Values

1 Reply

AD Administrator Syncfusion Team October 27, 2006 08:40 AM UTC

Hi Allen,

The reason is that the Hashtable class does not implement the IList interface, which is required for data binding. In order to get around this, you should provide an implementation of IList on the Hashtable, which will return the DictionaryEntry structures for each item in the list. This will cause the key/value pairs to be shown in the data grid.

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon