private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e)
{
int a;
int b;
foreach (DataGridViewRow row in dataGridView1.Rows)
{
if (int.TryParse(OdrQuantityTxtBx.Text, out a) &&
int.TryParse(row.Cells[1].Value.ToString(), out b))
{
row.Cells[2].Value = a * b;
}
else
{
}
}
}