I've upgrade my project to Microsoft Enterprise Library 5.0 (former version was 4.1) but I got a runtime error when the Rad Grid is binding.
My code is something like below:
End I get this error:
Data source is an invalid type. It must be either an IListSource, IEnumerable, or IDataSource.
I didn't have this problem with Microsoft Enterprise Library 4.1 or lower.
5 Answers, 1 is accepted
The issue you are facing is not related to our RadGrid control, but it is rooted in the IDataReader implementation returned by EntLib ExecuteReader method. The object (RefCountingDataReader) returned by the method is a wrapper over the actual IDataReader instance and does not implement none of the interfaces (IListSource, IEnumerable, or IDataSource) required by DataBoundControl. In order to verify this, you may try populating a MS GridView using the same approach.
However, you can work around by using the inner reader instead, similar to the following:
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
and the runtime error when i try to bind the DataSource i get, is this:
"Detalles de la excepción: System.InvalidOperationException: El origen de datos no es un tipo válido. Deber ser IListSource, IEnumerable o IDataSource."
:( thanks in advance......
and then fill a dataSource
oDropDownList.DataSource = GetRolesDS();
) with this method:
I'm quite sure that there is a better way to do this but i can not find it, so... if anyone get here and read this bad code and like to help that would be very appreciated