Using asp.net 3.5 Gridview control, visual studio 2008.
I have played with all the css border controls and can't set the color of the horizontal line between rows in an asp.net gridview. The color of the line seems to be defaulting to white. The only way those rows are visible are if the background color of the gridview is set to a dark color that contrasts with the white lines.
I have set Gridlines=Horizontal but cant find a way to set Gridlines color.
The gridview bordercolor attribute only affects the outermost border around the entire gridview.
I would rather not do this in javascript or jquery.
Add a css class to the GridView CssClass="someClass", then do something like:
Update: Try something like this:
<style>
.someClass tr td
{
border-top: 1px solid red;
border-bottom: 1px solid red;
}
</style>
<asp:GridView ID="GridView1" runat="server" ... GridLines="Horizontal" CssClass="someClass">
And you will get red grid lines.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With