Change DataGrid Headings color

T

tshad

How do I change the color of a particular columns' text (forecolor)?

I normally do this in my PreRender function for the rows as:

for each oItem as DataGridItem in DataGrid1.Items
oLabel = CType(oItem.FindControl("SessionID"),Label)
oLabel.ForeColor = System.Drawing.Color.Orange
next

How do I access the columns HeaderText to make this change?

Thanks,

Tom
 
T

tshad

Winista said:
You can do it in RowCreated or DataBound events for the grid.
The articles in this link will give you some more info about it.

http://www.netomatix.com/datagridseries.aspx

Good articles, but none of them (at least as far as I could tell) talk about
how to change a particular columns HeaderText.

One of the articles talk about how to change the headers as a group, but not
a particular header, as we can do with a particular cell.

Thanks,

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top