private void ValuesGrid_CellLeave(object sender, DataGridViewCellEventArgs e) { ValuesGrid.EndEdit(); }