I need to loop through my datagridview1 to obtain the name of each of the columns to set the attributes.

I'm not sure what I need to look for when doing this.

I tried:

For Each Field As String In DataGridView1.DataGridViewColumn
and
For Each Field As String In DataGridView1.Columns

But it's giving me errors.

What would be the proper way to loop through the DatGridView and get the name of each column?

Thx again!