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
close icon

GridGroupingControl Datasource

The GridGroupingControl Datasource property is of type object but it throws an 'DataSourceComplexBinding' error whenever a Dictionary or Hashtable object is used. It seems so far that the Datasource can only take in objects implementing IList. Is there any way a Dictionary can be used directly as the Datasource?

3 Replies

AD Administrator Syncfusion Team January 10, 2007 04:48 AM UTC

Hi Yong,

Please refer to the below forum thread for more details.
http://www.syncfusion.com/support/Forums/message.aspx?MessageID=51032

Best Regards,
Haneef


AD Administrator Syncfusion Team January 10, 2007 12:00 PM 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
'
Unfortunately this does not seem to work. Can a working example be provided please?


AD Administrator Syncfusion Team January 11, 2007 07:08 AM UTC

Hi Yong,

Please try the attached sample and let me know if you are looking something different.
HashTableDatasource.zip

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon