private void 批次修改備註ToolStripMenuItem_Click(object sender, EventArgs e) { ServiceDataRow sdr = (ServiceDataRow)dataGridViewX1.CurrentRow.DataBoundItem; ChangeTextForm ctf = new ChangeTextForm("備註", sdr.Remark); DialogResult dr = ctf.ShowDialog(); if (dr == System.Windows.Forms.DialogResult.Yes) { foreach (DataGridViewRow row in dataGridViewX1.SelectedRows) { sdr = (ServiceDataRow)row.DataBoundItem; sdr.Remark = ctf.ChangeText; } } }