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