user131990
user131990

Reputation: 31

GridLines Color in IE and FF

I have gridlines set to true on a gridview, i want the lines to be grey. By default, the lines in IE appear grey, due to my stylesheets; but in Firefox, there is a dark line separating the header columns.

I have tried adding

this.GridView1.Attributes.Add("bordercolor", "#ddd"); 

This fixes the FireFox issue, but in IE it shows the dark lines.

Upvotes: 2

Views: 2146

Answers (2)

rism
rism

Reputation: 12132

Is there a reason why you are doing this programmatically?

If you open the html file (.ascx, .aspx) you should be able to set an inline style on the grid with style="border:1px solid #ddd;" or preferably use the CssClass property of the grid and point it at an externally defined style CssClass="myGridStyle" where myGridStyle is defined as

.myGridStyle {
   border:1px solid #ddd;
}

Upvotes: 1

Jacob
Jacob

Reputation: 914

I know it's an old topic but needed solution for this too and @rism's solution did not apply , so i came up with simplest of all.

in css

td
{
 border:1px solid #ddd; 
}

Upvotes: 1

Related Questions