How to change Header Text of Data Bound Datagrid

Hema Rawat

Member
Joined
Dec 12, 2005
Messages
24
Location
India
Programming Experience
1-3
Hi.

How we can change the headre text of the columns which r bounded from the databse

AS I donot want to show the the datafield name on the headre text of the columns in datagrid
e.g.

Dept_Code

Instead of this i want to display it as

Department Code

Thnaks in advance

Hema chaudhry
 
You have to use column styles. Look up the DataGridColumnStyle class in the help/MSDN for more info. Also, the Windows Forms FAQ link in my signature has a wealth of information on working with a DataGrid as well as many other WinFoems controls.
 
Change Header Text of Datagrid

Hi ,

Exactly I don't get any solution
But wat i planned to do is to change the caption in the SQL
Query itself .
So that the changed caption will take the position
of the Header text of bound datagrid.

May this helps.
 
Back
Top