DataList Creates Tables That Are Not Well-Formed

Discussion in 'ASP .Net Web Controls' started by Nathan Sokalski, Nov 30, 2005.

  1. I have a DataList control that has 3 columns (RepeatColumns property = 3).
    However, because the number of Items in the DataSource is not always equally
    divisible by 3, the last 1 or 2 cells in the generated Table is sometimes
    missing. Rather than place code such as <TD></TD> there, ASP.NET simply
    leaves it blank. Therefore, the last row is sometimes not well-formed. This
    not only causes problems in some browsers, but because my Templates have a
    background color, the area of the missing cell looks weird because the page
    background shows through. I am sure I am not the first person to have this
    problem, so I would think that there should be some way around this other
    than writing extra code (I know how to use the Mod operator, but I want to
    know if there is some way without doing extra calculations. Is there? Is
    there one in ASP.NET 2.0? Thanks.
    --
    Nathan Sokalski

    http://www.nathansokalski.com/
     
    Nathan Sokalski, Nov 30, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. wtsnet
    Replies:
    4
    Views:
    694
    wtsnet
    Nov 25, 2003
  2. Assimalyst
    Replies:
    4
    Views:
    14,347
    Brock Allen
    Jul 25, 2005
  3. mike
    Replies:
    3
    Views:
    14,768
    Karl Seguin
    Nov 24, 2005
  4. Nathan Sokalski

    DataList Creates Tables That Are Not Well-Formed

    Nathan Sokalski, Nov 30, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    379
    Nathan Sokalski
    Nov 30, 2005
  5. Nathan Sokalski

    DataList Creates Tables That Are Not Well-Formed

    Nathan Sokalski, Nov 30, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    119
    Nathan Sokalski
    Nov 30, 2005
Loading...

Share This Page