I use css classes
<asp:datagrid id="dgScans" runat="server" pagesize="5" allowpaging="True" width="100%" datakeyfield="ScanPath" cellpadding="3" cssclass="datagrid" autogeneratecolumns="False">
<selecteditemstyle cssclass="selectedItemStyle"></SELECTEDITEMSTYLE>
<itemstyle cssclass="itemStyle""></ITEMSTYLE>
<alternatingitemstyle cssclass="alternatingItemStyle"></alternatingitemstyle>
<headerstyle cssclass="headerStyle"></HEADERSTYLE>
<footerstyle cssclass="footerStyle"></FOOTERSTYLE>
<columns>
<asp:buttoncolumn commandname="Select" headertext="Filename" datatextfield="Name"></asp:buttoncolumn>
<asp:boundcolumn headertext="Scan Date" datafield="ScanDate"></asp:boundcolumn>
</COLUMNS>
<pagerstyle cssclass="pagerStyle"></PAGERSTYLE>
</asp:datagrid>
..datagrid
{
border: 1px #013DA4 solid;
background-color: #FFFFFF;
}
..selectedItemStyle
{
background-color: "#DDEEFF";
color: Navy;
font-weight: bold;
}
..itemStyle
{
color: #000066;
}
..alternatingItemStyle
{
background-color: #F7F7FC;
}
..headerStyle
{
color: white;
font-size: 0.7em;
font-weight:bold;
background-image: url(../images/HeaderBackground.gif);
background-color: #4455aa
}
tr.headerStyle td a:link
{
color: white;
text-decoration: none;
}
tr.headerStyle td a:visited
{
color: white;
text-decoration: none;
}
tr.headerStyle td a:hover
{
color: white;
text-decoration: underline;
}
tr.headerStyle td a:active
{
color: white;
text-decoration: underline;
}
..footerStyle
{
background-color: White;
color: #000066;
}
..pagerStyle
{
background-color: White;
color: #000066;
text-align: left;
}