Why can't I bind the WPFToolkit DataGrid ItemSource to DataTable?
问题 In a Telerik control, I was able to bind a DataTable directly to the ItemSource , but when I switched to the Codeplex WPFToolkit Datagrid : <dg:DataGrid Name="theGrid"/> --- theGrid.ItemsSource = dt; I get this error: Cannot implicitly convert type 'System.Data.DataTable' to 'System.Collections.IEnumerable'. How can I bind the DataTable to the WPFToolkit DataGrid ? 回答1: You'll have to project your datatable into something that implements IEnumerable as that is waht the DataGrid expects. The