1) Have you set a breakpoint in your method to see if it even gets hit?
2) Your convert calls are very dangerous as you have them coded because they assume that every cell referenced will ALWAYS contain a valid double value. The safer way to do this would be like this:
double a, b;
if( double.TryParse( dgvSales.Rows[i].Cells["Quantity Sold"].Value, out a ) &&
double.TryParse( dgvSales.Rows[i].Cells["Unit Price"].Value, out b ) )
{
this.dgvSales.Rows[i].Cells[5].Value = (a*b).ToString("0.00");
}
else
{
this.dgvSales.Rows[i].Cells[5].Value = "Some default value";
}
[Edit]
As noted in the comments, this does not address the root issue at hand which is your infinite loop being created by updating cells directly. The way to solve this is to have an underlying DataTable which is used as a DataSource for the DataGridView control. In the cell value changed handler, update the underlying DataTable value and then perform your calculations on that object. When complete, simply rebind your DataGridView and you should be ok. But please use the .TryParse and not the Convert to avoid conversion errors.