private void 编辑ToolStripMenuItem_Click(object sender, EventArgs e) { this.Cursor = Cursors.WaitCursor; DataGridViewCell cell = (DataGridViewCell)dgvListData.SelectedRows[0].Cells["Idx"]; string strPID = cell.Value.ToString(); string strKeyName = dgvListData.SelectedRows[0].Cells["标引项"].Value.ToString(); By.frmEditByItem frm = new By.frmEditByItem(int.Parse(strPID), strKeyName); if (frm.ShowDialog().Equals(DialogResult.OK)) { LoadData(true); } this.Cursor = Cursors.Default; }