4 Answers, 1 is accepted
0
Hello,
Vlad
the Telerik team
Can you clarify why you need this?
Regards,Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0

David
Top achievements
Rank 1
answered on 20 Oct 2011, 02:50 PM
We have an existing set of code that utilizes the Telerik ORM to create a DataTable from an open-ended database structure. Due to the dynamic nature of the data being pulled/created, Telerik recommended this approach. We have now written code that generates a report based on the DataTable structure but our customer has requested the ability to filter certain parts of the results from the UI.
In playing around with the DataFilter, we found it could easily answer this as it can filter the DataTable results without a problem but the output was in a ItemDataCollection format which is not compatible with the other code that already exists. Since the report generation code is complex and our time is short for delivery, it is not something we ideally want to rewrite.
I wanted to know if there is a simple way to convert the ItemDataCollection to a DataTable.
In playing around with the DataFilter, we found it could easily answer this as it can filter the DataTable results without a problem but the output was in a ItemDataCollection format which is not compatible with the other code that already exists. Since the report generation code is complex and our time is short for delivery, it is not something we ideally want to rewrite.
I wanted to know if there is a simple way to convert the ItemDataCollection to a DataTable.
0
Accepted
Hi,
Vlad
the Telerik team
You can use the approach from this thread:
http://stackoverflow.com/questions/1253725/convert-ienumerable-to-datatable
Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0

David
Top achievements
Rank 1
answered on 21 Oct 2011, 09:21 PM
Thanks. That code example worked for me.