I'm using the WPF toolkit DataGrid.
How can I get the values of the cells by the row i and column j?
For example like this: string s= datagrid1....[i][j];
i've viwed this but it doesn't work:
for (int j = 0; j < dataGrid1.Columns.Count; j++)
{
for (int i = 0; i < dataGrid1.Items.Count - 1; i++)
{
string s=(dataGrid1.Items[i] as DataRowView).Row.ItemArray[j].ToString();
}
}
the error is: An unhandled exception of type 'System.NullReferenceException' occurred in