Simple do this on datagrid cell double click
Textbox1.Text = dataGridView1[0, e.RowIndex].Value.ToString();
see this
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
Textbox1.Text = dataGridView1[0, e.RowIndex].Value.ToString();
}
0 is my ID Column so ill get id on text box