Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display column description on datagrid header instead of column name

Status
Not open for further replies.

newtoolap

IS-IT--Management
Sep 22, 2002
5
TH
Hi,

I have a table "Person" that I want to bind to the datagrid on the form.

Person(ID, FirstName, LastName, BirthDate, Address)

The table is stored in SQL server 2000 database. In the table designer I put in the description for each columns a more readable name such as ID, First Name, Last Name, Date of Birth

After successful binding the column header display the column name i.e. ID, FirstName, LastName ...

Is there any way that I can automatically display the column description on the header instead of the column name.

Thank you in advance.
 
When your aspx is in design view click on the grid and hit F4 this will show the properties. You will see a link at the bottom Property Builder... Click the link. To the left you will see columns click that. Uncheck Create columns automatically at run time. Click Bound Column then the > box. You will be presented with BoundColumn properties and there you can enter your column header and data field. Do this for all of your columns.
Marty
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top