In normal WinForm application you can do that:
DataTable dataTable = new DataTable(); dataTable = dataGridRecords.DataSource;
but how to do
You don't need the DataViewAsDataTable method. Just do the following:
DataViewAsDataTable
DataTable dt = ((DataView)dataGrid1.ItemsSource).ToTable();