I want to have a gridview with a red outer border and blue inner separator lines and used this markup/css:
<asp:GridView runat="server" ID="entries" CssClass="grid" AutoGenerateColumns="false">
<Columns>
<asp:BoundField DataField="Id" HeaderText="Id" />
<asp:BoundField DataField="Name" HeaderText="Name" />
</Columns>
</asp:GridView>
.grid
{
border: solid 1px Red !important;
}
.grid td
{
border: solid 1px Blue;
}
But the result is that only the header row has a red outer border, not the others.
I also tried RowStyle in the same way, with no success.
Tested in IE 9, Chrome.
UPDATE
I got it I think, try this:
Tested with IE9.
If you want to add boundfields, add them between the first and last one without cssclass.
The first and last boundfield must have
.firstand.lastcssclass.