How To get cell content of Datagrid of Type DataGridTextColumn
<p>I have a data grid that contains 4 columns by 6 rows, the fourth column is type of DataGridTextColumn, I want to get the values of cells and writing them to a text file, for the type DataGridComboBoxColumn and Textblock is ok, I can get the values, but for the type of DataGridTextColumn I can not and this column is manually be entered through the application (writing value in it like textbox), I used:</p>

<pre><code>FrameworkElement fe = datagrid.columns[3].GetCellContent(datagridrow);
TextBlock tb = fe as TextBlock;
streamWriter.Write(tb.Text);
</code></pre>

<p>but it didn't work, can anyone help, please?</p>

<p>Thanks</p>
