Try the following codes:
int qty = 0;
int amount = 0;
int rowTotal = 0;
int subTotal = 0;
int total = 0;
foreach(GridViewRow row in GridView1.Rows)
{
qty = Convert.ToInt32(row.Cells[0].Text);
amount = Convert.ToInt32(row.Cells[1].Text);
rowTotal = qty * amount;
subTotal += rowTotal
}
total = subTotal;
Label1.Text = total.ToString();
Please Mark as answer and vote 5 if this solved your problem
Best regards,
Eduard