How do I set the color of the horizontal line between the rows in the ASP.NET GridView?

Use asp.net 3.5 Gridview control, visual studio 2008.

I have played with all css border controls and cannot be set in asp.net gridview The color of the horizontal lines between the rows. The color of the lines seems to be white by default. The only way these rows are visible is to set the background color of the grid view to a darker color that contrasts with the white lines.

I set Gridlines = Horizontal but I can’t find a way to set the color of the grid lines.

The gridview bordercolor property only affects the outermost border around the entire grid view.

I would rather not javascript Or do it in jquery.

add a css class to the GridView CssClass = “someClass”, then Do the following:

Update: try something like this:



You will get red grid lines.

Using the asp.net 3.5 Gridview control, visual studio 2008.

I have played with all the css border controls, and I cannot set the color of the horizontal line between the rows in the asp.net gridview. The color of the lines seems to be white by default. The only way these lines are visible is to set the background color of the grid view to a darker color that contrasts with the white lines.

I set Gridlines = Horizontal but Can’t find a way to set the color of the grid lines .

The gridview bordercolor property only affects the outermost border around the entire grid view.

I would rather not do this in javascript or jquery.

Add a css class to the GridView CssClass = “someClass”, and then do the following:

Update: try something like this:



You will get red grid lines.

Leave a Comment

Your email address will not be published.