public void multiplyrows()
{
for (int i = 0; i < dgvSales.Rows.Count - 1; i++)
double a = Convert.ToDouble(dgvSales.Rows[i].Cells["Quantity Sold"].Value);
double b = Convert.ToDouble(dgvSales.Rows[i].Cells["Unit Price"].Value);
this.dgvSales.Rows[i].Cells[5].Value = (a*b).ToString("0.00");
}
private void dgvSales_CellValueChanged(object sender, DataGridViewCellEventArgs e)
multiplyrows();