DG Column Width vs Table Column Width

Discussion in 'ASP .Net Datagrid Control' started by Carl Howarth, Oct 22, 2004.

  1. Carl Howarth

    Carl Howarth Guest

    Hi,

    I am wanting to display data in a datagrid with additional header rows above
    it that categorise some of the main headers of the datagrid. I am therefore
    creating a table above the datagrid using the same padding/spacing options.

    The problem I am having is that when I define the width of a TD in my table
    to be, say 300px, that should cover 3 columns of the datagrid, each at 100px
    wide they are always misaligned and I have to start taking a pixel off here
    and there within my header table. Also, the vertical space between the 2 is
    usually larger than the cellspacing, which is livable though it would be
    nice to know how to stop this!

    Surely if I am defining the width of anything in pixels, it should be
    displayed at the same width regardless of the object's type?!

    Any advice would be gratefully received.

    Thanks, Carl
     
    Carl Howarth, Oct 22, 2004
    #1
    1. Advertising

  2. Carl,

    When in comes to column width, the browser considers your instructions as
    recommendations. You are not in control. Let the browser decide on the
    column width and then resize the columns for the additional header in a
    javascript.

    Eliyahu

    "Carl Howarth" <> wrote in message
    news:...
    > Hi,
    >
    > I am wanting to display data in a datagrid with additional header rows

    above
    > it that categorise some of the main headers of the datagrid. I am

    therefore
    > creating a table above the datagrid using the same padding/spacing

    options.
    >
    > The problem I am having is that when I define the width of a TD in my

    table
    > to be, say 300px, that should cover 3 columns of the datagrid, each at

    100px
    > wide they are always misaligned and I have to start taking a pixel off

    here
    > and there within my header table. Also, the vertical space between the 2

    is
    > usually larger than the cellspacing, which is livable though it would be
    > nice to know how to stop this!
    >
    > Surely if I am defining the width of anything in pixels, it should be
    > displayed at the same width regardless of the object's type?!
    >
    > Any advice would be gratefully received.
    >
    > Thanks, Carl
    >
    >
    >
     
    Eliyahu Goldin, Oct 24, 2004
    #2
    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. AndrewF
    Replies:
    1
    Views:
    822
    Bruce Barker
    Oct 10, 2005
  2. savvy
    Replies:
    1
    Views:
    492
    savvy
    Jan 18, 2006
  3. Sean Jorden
    Replies:
    1
    Views:
    618
    laurie
    Aug 19, 2003
  4. Cal
    Replies:
    1
    Views:
    547
    Tim B
    Jan 8, 2007
  5. David Basford
    Replies:
    3
    Views:
    2,505
    BootNic
    Sep 30, 2007
Loading...

Share This Page