Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7546459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:12:14+00:00 2026-05-30T09:12:14+00:00

I am developing an asp page and the GridView GridLines are not showing up

  • 0

I am developing an asp page and the GridView GridLines are not showing up in IE but it is showing up on Firefox and Chrome. Is there something specific that needs to be done for the IE side.
This is my css file for GridView:

/* grid table */
table.gridview {
  border-collapse: collapse;
  margin: 0px !important;
  border: #6593cf 1px solid;
}
.gridview td {
  font-size: 11px;
  font-family: Arial;
  color: #000000;
  cursor: default;
  text-align: left;
}
.gridview th {
  font-size: 11px;
  font-family: Arial;
  color: #484848;
  cursor: default;
  text-align: left;
}
table.gridview a {
  color: #000000;
  text-decoration: none;
}
table.gridview a:hover {
  text-decoration: underline;
}

/* header row */
tr.gridview_hdr {
  background-color: #deecff;
}
.gridview_hdr th {
  color: black;
  font-weight: normal;
  text-align: left;
  border-top: solid 1px #6593cf;
  border-bottom: solid 1px #6593cf;
  border-left: solid 1px #6593cf;
  border-right: solid 1px #6593cf;
  padding-left: 5px;
  padding-right: 5px;
  padding-top: 2px;
  padding-bottom: 2px;
}
.gridview_hdr th a {
  color: #000000;
  text-decoration: none;
  font-weight: bold;
}
.gridview_hdr th a:hover {
  color: #000000;
  text-decoration: underline;
}

/* item row */
tr.gridview_itm {
  background-color: #ffffff;
}
.gridview_itm td {
  padding: 2px 5px;
  border-right: #ffffff 0px solid;
  border-top: #ffffff 1px solid;
  border-left: #ffffff 0px solid;
  border-bottom: #add1ff 1px solid;
}
.gridview_itm td a {
  text-decoration: underline;
}

/* alternating item row */
tr.gridview_aitm {
  background-color: #ffffff;
}
.gridview_aitm td {
  padding: 2px 5px;
  border-right: #ffffff 0px solid;
  border-top: #ffffff 1px solid;
  border-left: #ffffff 0px solid;
  border-bottom: #add1ff 1px solid;
}
.gridview_aitm td a {
  text-decoration: underline;
}

/* pager row */
tr.gridview_pgr {
  width: 100%;
  font-family: verdana;
  font-weight: bold;
  font-size: 11pt;
  color: #ff9900;
}
.gridview_pgr td {
  background-image: url(/Monitor/App_Themes/Sugar2006/images/bg.gif);
  background-repeat: repeat-x;
  height: 23px;
  padding: 0px;
  font-size: 10px;
  font-family: Arial;
}
.gridview_pgr_ddl {
  font-size: 10px;
  font-family: Arial;
}
.gridview_pgr A {
  font-family: verdana;
  font-size: 9pt;
  text-decoration: none;
  color: #0000ff;
}

and this is my aspx page:

<asp:GridView 
    ID="GridView1" 
    runat="server" 
    CssClass="gridview" 
    RowStyle-CssClass="gridview_itm" 
    AlternatingRowStyle-CssClass="gridview_aitm" 
    HeaderStyle-CssClass="gridview_hdr" 
    PagerStyle-CssClass="gridview_pgr" 
    AutoGenerateColumns="False" 
    AllowPaging="True" PageSize="50" Width="100%" AllowSorting="True" 
    onsorting="GridView1_Sorting" onrowdatabound="gridView1_RowDataBound" 
    onpageindexchanging="GridView1_PageIndexChanging">

Also I do have GridLines = "Both" on the GridView properties.
What am I doing wrong?

Thanks for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T09:12:15+00:00Added an answer on May 30, 2026 at 9:12 am

    With the GridView, the declarative bordercolor attribute adds an inline style declaration which only applies to the table itself, not individual cells.

    Adding the bordercolor attribute programmatically does not use an inline style, but uses the HTML bordercolor property, which browsers apply to ALL borders inside the table.

    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
       foreach (TableCell tc in e.Row.Cells)
       {
         tc.Attributes["style"] = "border-color: #c3cecc";
       };
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a Classic ASP page that pulls some content from a database and
I am developing an ASP.NET website. There are some pages on my sit that
I'm developing an ASP.NET application with C# and Ajax. I have a page that
I am developing an asp.net page/application. I have created a textbox that i set
I am developing a ASP.Net web site and my page works normally in IE/Firefox/Opera
I'm developing an ASP.NET web application. When a user loads a specific page on
I am developing an ASP.NET project with C#, and I wrote a page named
HI, I am developing a web page using asp.net. I am using some links
I have been developing in asp.net since its existence (also classic asp before that)
The web application that I am developing right now has something called quiz engine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.