private void dataGridViewX1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { if (e.RowIndex >= 0) { string Devid = dataGridViewX1["DevID", e.RowIndex].Value.ToString(); formDevSetting dev = new formDevSetting(Devid); dev.ShowDialog(); } }
private void btnChangeDevSetting_Click(object sender, EventArgs e) { if (dataGridViewX1.SelectedRows.Count == 1) { string Devid = dataGridViewX1.SelectedRows[0].Cells["DevID"].Value.ToString(); formDevSetting dev = new formDevSetting(Devid); dev.ShowDialog(); } else if (dataGridViewX1.SelectedRows.Count > 1) { } }