I am using the GridView - AutoGenerateSelectButton = \"True\"
to select the row in order to get the Column 1 cell value.
I have tried:
Try changing your code to
// Get the currently selected row using the SelectedRow property.
GridViewRow row = dgCustomer.SelectedRow;
// And you respective cell's value
TextBox1.Text = row.Cells[1].Text
UPDATE: (based on my comment) If all what you are trying to get is the primary key value for the selected row then an alternate approach is to set
datakeynames="yourprimarykey"
for the gridview definition which can be accessed from the code behind like below.
TextBox1.Text = CustomersGridView.SelectedValue.ToString();