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

How to change the column header in windows form datagrid

P: n/a
How can I change the column header text in windows form datagrid?

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
You can use datagridcolumnstyles for that
http://msdn.microsoft.com/library/de...rtexttopic.asp

I hope this helps?

Cor
How can I change the column header text in windows form datagrid?

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*

Nov 21 '05 #2

P: n/a
Hi,

an other simple solution is to create a column alias in your select
statement:
for example: Select code as Number from table
will set the column header to Number

hth Peter

"Cor Ligthert" <no************@planet.nl> wrote in message
news:Ot*************@tk2msftngp13.phx.gbl...
You can use datagridcolumnstyles for that
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemwindowsformsdatagridcolumnstyleclasshea dertexttopic.asp
I hope this helps?

Cor
How can I change the column header text in windows form datagrid?

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*


Nov 21 '05 #3

P: n/a
Peter,

That was what I did not wanted to write?

:-)

Cor

"Peter Proost" <pp*****@nospam.hotmail.com>
Hi,

an other simple solution is to create a column alias in your select
statement:
for example: Select code as Number from table
will set the column header to Number

hth Peter

"Cor Ligthert" <no************@planet.nl> wrote in message
news:Ot*************@tk2msftngp13.phx.gbl...
You can use datagridcolumnstyles for that

http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemwindowsformsdatagridcolumnstyleclasshea dertexttopic.asp

I hope this helps?

Cor
> How can I change the column header text in windows form datagrid?
>
> *-----------------------*
> Posted at:
> www.GroupSrv.com
> *-----------------------*



Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.