How to set the color of horizontal lines between lines in gridview asp.net?

Using asp.net 3.5 Gridview Management, Visual Studio 2008.

I played with all css border elements and couldn't set the color of the horizontal line between the lines in gridview asp.net. The line color does not seem to match white by default. The only way these lines are visible is if the background color of the grid is set to a dark color that contrasts with the white lines.

I set Gridlines = Horizontal, but couldn't find a way to set the color of the Gridlines.

The gridview bordercolor attribute only affects the outer border around the entire gridview.

I would prefer not to do this in javascript or jquery.

+3
source share
3 answers

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 get red grid lines.

+7
source

I think you want to install "BackColor"

0
source

​​ , .

RichardOD . , RichardOD!

:

radioobuttonlist , () .

css,

.control tr td
{
border-style:none;
}

#, , :

RadioButtonList rb = new RadioButtonList()
 ...
 rb.CssClasss="control";
0

Source: https://habr.com/ru/post/1717288/


All Articles