title: Cycle through specific column in WPF DataGrid
body: <p>I am trying to cycle through a specific column in wpf datagrid and get that cell's content.  I am trying this code:</p>
  
  <pre><code>var itemsSource = tblData.ItemsSource as IEnumerable;
  for(int i = 0; i &lt; Convert.ToInt32(itemsSource.GetEnumerator().Current); i++)
  {
      System.Windows.Forms.MessageBox.Show(i.ToString());
  }
  </code></pre>
  
  <p>but it returns an exception: </p>
  
  <blockquote>
    <p>An unhandled exception of type 'System.InvalidOperationException' occurred in mscorlib.dll</p>
  </blockquote>
  
  <p>I was hoping someone can help me achieve my goal.  Thank you in advance.</p>