به جای ToString از convert استفاده کن.

txtName.Text = Convert.ToString(dataGridView1.CurrentRow.Cells[1].Value);