I am playing with code in an attempt to copy the value of a cell on a dataGridView into a TextBox:
I used the code below to identify the selected row in the dataGridView before trying to copy the content of the desired cell
Obviously there is some thing wrong in this code since the closing bracket which follows the word "Value" get a red line indicating a syntax error...
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
Int32 rowToUpdate = this.dataGridView1.Rows.GetFirstRow(
if (rowToUpdate > -1)
this.txtDate.Text = this.dataGridView1.Rows[rowToUpdate].Cells.Value;