Can't get value using datagridview.CurrentRow.Cells("Column Name").Value - Column name not found

I have been beating my head against the wall for the last hour looking at various postings that seem to replicate exactly what I have below.

When I look at my datagridview, I can see the specific column headings of which is 'Address'.  Yet when I run this line of code below, it tells me Column named Address can not be found.  Because the columns can be re-arranged I can't use the column index.  I HAVE TO USE THE COLUMN NAME.  What's wrong with this?
vals(i) = grdviewTable.CurrentRow.Cells("Address").Value
Who is Participating?
Jorge PaulinoConnect With a Mentor IT Pro/DeveloperCommented:
The column name could be different from the column text. Check that.
TSFLLCAuthor Commented:
I just realized in looking at my code where I dynamically set up the grid fields that I am not updating the column name.

You're on the mark.  Thanks!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.