Data Grid View Column Names


J

Joe Griffith

I'm using a Win Forms Data Grid View control in unbound mode.

When I add columns using the wizard the first item is the column name.
Everything works fine.

However, if you return to the columns collection and look at the
poperties of an individual column the name property is not in the list.
Is there a way to change (or even find) the name of a column in a data
grid view other than looking at it in the *.Designer.vb file?
 
Ad

Advertisements

C

Chris

Joe said:
I'm using a Win Forms Data Grid View control in unbound mode.

When I add columns using the wizard the first item is the column name.
Everything works fine.

However, if you return to the columns collection and look at the
poperties of an individual column the name property is not in the list.
Is there a way to change (or even find) the name of a column in a data
grid view other than looking at it in the *.Designer.vb file?

In the columns collections "edit columns" screen there is the column
name. It's in as "(name)" If you sort by name it'll be at the top,
otherwise it's under the Design group.

Chris
 
Ad

Advertisements

K

Ken Tucker [MVP]

Hi,

Take a look at the columns headertext and datapropertyname

DataGridView1.Columns(0).HeaderText



Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top