void editingControl_ButtonClick(object sender, EventArgs e) { NGReasonForm form = new NGReasonForm(); string oriReason = this.InputText; form.NGReason = oriReason; if (form.ShowDialog() == DialogResult.OK) { string newReason = form.NGReason; this.InputText = newReason; //cell.Value = cell.Value + "\n" + newReason; this.NotifyChange(); } }
private void btnNGReason_Click(object sender, EventArgs e) { try { DataGridViewCell cell = btnNGReason.Tag as DataGridViewCell; if (cell != null) { NGReasonForm form = new NGReasonForm(); string oriReason = cell.Value as string; form.NGReason = oriReason; if (form.ShowDialog() == DialogResult.OK) { string newReason = form.NGReason; cell.Value = newReason; //cell.Value = cell.Value + "\n" + newReason; } } } catch (Exception ex) { Global.ShowError(ex); } }