private void dataGridView1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { string pid = null; if (e.RowIndex >= 0) { DataGridViewRow row = this.dataGridView1.Rows[e.RowIndex]; pid = row.Cells["ID"].Value.ToString(); } StuffInfo si = new StuffInfo(pid); si.ShowDialog(); }