for (int i = 0; i <= e.ListSourceRowIndex; i++)
{
val = val + (decimal)view.GetRowCellValue(i, view.Columns["ProdA"]);
val = val + (decimal)view.GetRowCellValue(i, view.Columns["ProdB"]);
}
e.Value = val;
}
You are accumulating both totals into the same variable.