=======================
int subTotal;
int tt=0;
for (int i = 0; i < dataGridView1.RowCount; i++)
{
if (dataGridView1.Rows[i].Cells["Id"].Value.ToString()==pro.Id.ToString())
{
dataGridView1.Rows[i].Cells["Qty"].Value =int.Parse(dataGridView1.Rows[i].Cells["Qty"].Value.ToString() )+ int.Parse(textqty.Text);
tt = int.Parse(dataGridView1.Rows[i].Cells["total"].Value.ToString());
dataGridView1.Rows[i].Cells["total"].Value = int.Parse(dataGridView1.Rows[i].Cells["Qty"].Value.ToString()) * pro.Price;
subTotal = int.Parse(dataGridView1.Rows[i].Cells["total"].Value.ToString());
goto Total;
}
==========================