WPF iterate through datagrid

People seem to be overcomplicating this, this worked for me:

foreach (System.Data.DataRowView dr in yourDataGrid.ItemsSource)
{
     MessageBox.Show(dr[0].ToString());
}

Leave a Comment