Groups | Blog | Home
all groups > asp.net > march 2005 >

asp.net : Changing datagrid header text



Herry
3/7/2005 11:09:01 PM
Hi all,
I have problem with datagrid in asp.net using vb as the
language. This is how I show the datagrid from database

datagrid1.datasource = dataset1
datagrid1.DataBind()

Is there any possibility to change the header on every
column and how to set the column width

Herry
3/8/2005 12:50:49 AM
Hi Eliyahu

I dont understand how to use ItemCreated event.
can u show me the code to change the header.

Thanks a lot
[quoted text, click to view]
Eliyahu Goldin
3/8/2005 9:54:29 AM
You mean you are using autogenerated columns. The only way to change header
columns is to handle ItemCreated event. You can detect header item, get
access to the cells and change their text and width.

Eliyahu

[quoted text, click to view]

AddThis Social Bookmark Button