By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,819 Members | 1,459 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,819 IT Pros & Developers. It's quick & easy.

Datagrid Column Header

P: n/a
In a Windows form:

I need the code to manually set the header name of a
column in a datagrid to anything i want.

Everytime i retieve records from a database, the coloum
header of the datagrid defaults to the column header of
the coloumn in the table in the database.

so if the column header in the table is Cust_Name, i want
to change it to Customer Name.

NEED THE CODE ASAP ... PLEASE.
Thanx

Jul 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Use DataGridTableStyle

Dim TextBoxCol As New DataGridTextBoxColumn

TextBoxCol.MappingName = '(DATA BASE FIELD NAME)

TextBoxCol.HeaderText = '(DATA GRID DISPLAY NAME)

TextBoxCol.Format = (DATA FORMATING)

Schneider

"Will" <an*******@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...
In a Windows form:

I need the code to manually set the header name of a
column in a datagrid to anything i want.

Everytime i retieve records from a database, the coloum
header of the datagrid defaults to the column header of
the coloumn in the table in the database.

so if the column header in the table is Cust_Name, i want
to change it to Customer Name.

NEED THE CODE ASAP ... PLEASE.
Thanx

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.