Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Some of Gridview horizontal line missing

Some of Gridview horizontal line missing

Scheduled Pinned Locked Moved ASP.NET
wpfwcfhelpquestion
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Andraw111
    wrote on last edited by
    #1

    Hi, all, I create a gridview as the following There are default two columns, I will add the columns dynamically according method types. after data binding, I call GridView1.Attributes.Add("bordercolor", "#acc0e9"); to set gridview row border. The strange thing is that only some of rows have border, others with default horizontal line, this makes the table looks very strange. Does anybody has this issue before? Thanks!

    A T D 3 Replies Last reply
    0
    • A Andraw111

      Hi, all, I create a gridview as the following There are default two columns, I will add the columns dynamically according method types. after data binding, I call GridView1.Attributes.Add("bordercolor", "#acc0e9"); to set gridview row border. The strange thing is that only some of rows have border, others with default horizontal line, this makes the table looks very strange. Does anybody has this issue before? Thanks!

      A Offline
      A Offline
      Andraw111
      wrote on last edited by
      #2

      I am using IE6.

      N D 2 Replies Last reply
      0
      • A Andraw111

        I am using IE6.

        N Offline
        N Offline
        Not Active
        wrote on last edited by
        #3

        IE6 has been obsolete for many years and is known for unsupported implementations. I'd upgrade to a modern browser and test it there then worry if there is a problem.


        I know the language. I've read a book. - _Madmatt

        1 Reply Last reply
        0
        • A Andraw111

          Hi, all, I create a gridview as the following There are default two columns, I will add the columns dynamically according method types. after data binding, I call GridView1.Attributes.Add("bordercolor", "#acc0e9"); to set gridview row border. The strange thing is that only some of rows have border, others with default horizontal line, this makes the table looks very strange. Does anybody has this issue before? Thanks!

          T Offline
          T Offline
          T M Gray
          wrote on last edited by
          #4

          You are using the hardest way to add styles to a GridView. There are properties on the gridview object like BorderColor that you can access directly without using the attributes collection. You can also use RowStyle, AlternatingRowStyle and sever other presentation properties to get the look you want.

          D 1 Reply Last reply
          0
          • A Andraw111

            Hi, all, I create a gridview as the following There are default two columns, I will add the columns dynamically according method types. after data binding, I call GridView1.Attributes.Add("bordercolor", "#acc0e9"); to set gridview row border. The strange thing is that only some of rows have border, others with default horizontal line, this makes the table looks very strange. Does anybody has this issue before? Thanks!

            D Offline
            D Offline
            daveyerwin
            wrote on last edited by
            #5

            Andraw111 wrote:

            I call GridView1.Attributes.Add("bordercolor", "#acc0e9"); to set gridview row border

            Here you are adding the attribute bordercolor to the table element, and assigning it a value.This does not set gridview row border only table element bordercolor.

            1 Reply Last reply
            0
            • T T M Gray

              You are using the hardest way to add styles to a GridView. There are properties on the gridview object like BorderColor that you can access directly without using the attributes collection. You can also use RowStyle, AlternatingRowStyle and sever other presentation properties to get the look you want.

              D Offline
              D Offline
              daveyerwin
              wrote on last edited by
              #6

              T M Gray wrote:

              There are properties on the gridview object like BorderColor that you can access directly without using the attributes collection.

              Here is the reason this is a very good suggestion, few know the difference between html attributes and html properties, so it is best to stick with the html properties which are much more well known.

              1 Reply Last reply
              0
              • A Andraw111

                I am using IE6.

                D Offline
                D Offline
                daveyerwin
                wrote on last edited by
                #7

                Andraw111 wrote:

                I am using IE6.

                Well, you certainly have our sympathy. Not to worry, it's hardly a challenge for a competent coder :)

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups