private void button1_Click(object sender, EventArgs e)
{
DG.Rows.Add(textBox1.Text, textBox2.Text); //aqui agregamos la info a la data
int sumatoria = 0;
foreach(DataGridViewRow row in DG.Rows)
{
sumatoria += Convert.ToInt32(row.Cells[1].Value); //aqui recorre las celdas y las va sumando
}
txtPrecioTotal.Text = Convert.ToString(sumatoria); //aqui se graba el total
}