private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { string item = (dataGridView1.SelectedRows[0].Cells[1].Value.ToString()); Int64 id = 0; ado_project n = new ado_project(); n.select_id_itemname(item, ref id); open_item op = new open_item(id); op.ShowDialog(); }