This is a migrated thread and some comments may be shown as answers.

Error binding to DataTable with column of type 'Object'

1 Answer 96 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Al
Top achievements
Rank 1
Iron
Iron
Iron
Al asked on 05 Dec 2014, 11:41 AM
I am building a datable from Active Directory data and using this as datasource for my grid but I get the error:

"Cannot find any bindable properties in an item from the datasource "

The error is because I am using: dt.Columns.Add(new DataColumn(property, typeof(Object)));

I don't know if this is a bug or not but I can use that same datable as datasource for winforms DataGridView just fine.

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 09 Dec 2014, 03:31 PM
Hi Al,

The behavior that you are observing is due to the fact that RadGrid could understand and handle only the types listed in the following help article:
Having an Object type is not supported scenario and RadGrid will not be able to handle such column, so please specify the type of the column to one of the accepted ones or switch to a custom collection as a data source:
Hope this helps.


Regards,
Konstantin Dikov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Al
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Konstantin Dikov
Telerik team
Share this question
or