I have a view model in my C# 4.0 app which has a System.Data.DataTable that's created in it using a service call. I want to bind this to a datagrid in my XAML file.
System.Data.DataTable
datagrid
I tried following line DataGrid_Loaded event but its getting fired up before my datatable gets created inside the view model.
xaml:
<dg:DataGrid Name="myDataGrid" Loaded="DataGrid_Loaded"/>
xaml.cs:
myDataGrid.ItemsSource = myViewModel.myDataTable.DefaultView;