Set gridview header color in css
Setting a gridview header forecolor is pretty straight forward. One thing to keep in mind is that enabling sorting makes the header element = A, so you need to have an A class in your css.
.dgrHeader
{
color:Red;
text-align:left;
height:10px;
}
.dgrHeader a:link, .dgrHeader a:visited, .dgrHeader a:active
{
color:rgb(102,102,102);
text-align:left;
height:10px;
}
After your css is configured, you can either set the property programatically:
grdTemp.HeaderStyle.CssClass = "dgrHeader"
or in the grid itself:
<HeaderStyle CssClass="dgrheader" />