First, wire up your click event, by selecting the GridView control and double clicking the Click
field located under the Lightening Bolt:
Next, expanding on an answer already posted:
private void dataGrid_Click(object sender, EventArgs e) {
int row = dataGrid1.CurrentCell.RowNumber;
int col = dataGrid1.CurrentCell.ColumnNumber;
textBox1.Text = string.Format("{0}", dataGrid1[row, col]);
}
I use string.Format
because sometimes your data could be null or DBNull.Value
.