private void dataGridViewNonCash_CellValueChanged(object sender, DataGridViewCellEventArgs e) { summaryNonCash = 0; foreach (DataGridViewRow row in dataGridViewNonCash.Rows) { if (!row.IsNewRow) { double amountNonCash = Convert.ToDouble(row.Cells["Amount"].Value); summaryNonCash += amountNonCash; } } textBoxNonCashAmount.Text = summaryNonCash.ToString(Program.NUMBER_FORMAT); }