Click here to Skip to main content
15,895,709 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,

I'd like to derive a DataTable instance from my WPF DataGrid. The DataGrid has a list of objects that make up the datasource for the grid. I need to generate a report from the grid's content. The report unfortunately can't use wpf components as the datasource I'm using telerik reporting and need to send the dataTable as a parameter when creating an instance. Is there an easy way to do this? Even if its not a DataTable and rather some other data structure that reflects the Datagrid's content, that would also work. I don't particularly want to program a function to do this if there is an easier way.

Thanx
Posted

1 solution

How did you create your datagrid? Do you bind to something like an ObservableCollection? If so, your collection wraps individual instances of items, and you could send this over to the reporting (I'm assuming it supports accepting information from IEnumerable<T> here).

 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900