I'm facing an issue when trying to verify if a cell of a wpf datagrid is null, I always get a null reference exception even when I try to verify if it's null, can anyone help me here?
code bellow
for (int i = 0; i < commandeDataGrid.Items.Count; i++)
{
DataRowView row = commandeDataGrid.Items[i] as DataRowView;
if (row["Prix Total TTC"]!=null)
{
count = count + Convert.ToInt16(row["Prix Total TTC"]);
}
}