Tech Tidbits - Ruby, Ruby On Rails, Merb, .Net, Javascript, jQuery, Ajax, CSS...and other random bits and pieces.

Monday, January 21, 2008

ASP.NET GridView - Header always bold

GridView uses a table and creates a <th> tag for the header, which will bold all the text generated by the GridView. Here's a simple solution:

Set a style:

<style>
.GridViewHeaderStyle th {
font-weight: normal;
}
</style>

And apply it to your GridView:

<asp:GridView ID="grdSomeGrid" runat="server" CssClass="GridViewHeaderStyle">
...
</asp:GridView>

No comments:

About Me

My photo
Developer (Ruby on Rails, iOS), musician/composer, Buddhist, HSP, Vegan, Aspie.

Labels