GridView Height

Discussion in 'ASP .Net Web Controls' started by Ben Schumacher, Mar 30, 2006.

  1. The rows in my gridview are not holding their height as specified in the
    <RowStyle height="18"/> and <AlternatingRowStyle height="18"/>. This occurs
    when I have maybe 2 or 3 records in my gridview control, but the height
    propery of the gridview control is set to like 150. I just want the rows to
    vertically align to the top and list out down the grid. Instead, the rows
    automatacally adjust their height to fill in the extra space in the grid.
    How can I stop this?
     
    Ben Schumacher, Mar 30, 2006
    #1
    1. Advertising

  2. Ben Schumacher

    Guest

    GridViews display tabular data and are rendered as tables (at least in
    IE). The gridview rows are rendered as <tr> elements within the
    <table>...You get the idea.

    Do you want to have an empty space at the bottom when the total rows
    are less than ceiling(150/18)?
    To achieve that look, gridview would have to render an extra row + a
    cell that spans the entire of this extra row which fills the remaining
    space in height.

    It might just be possible to achieve what you want by showing the
    gridview footer and making the footer height fill this extra space.
    Someone more expert than I in html/css might be able to help you with
    the style needed.
    Then you can modify your gridview's <FooterStyle> accordingly.

    Regards.
     
    , Mar 31, 2006
    #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. Replies:
    0
    Views:
    560
  2. Wotney
    Replies:
    1
    Views:
    535
    Flinky Wisty Pomm
    Oct 25, 2006
  3. tshad
    Replies:
    1
    Views:
    1,694
    bruce barker
    Mar 8, 2007
  4. Bernd Meier
    Replies:
    6
    Views:
    518
    GTalbot
    Jan 14, 2008
  5. samer
    Replies:
    3
    Views:
    435
    Gregory A. Beamer
    Sep 28, 2009
Loading...

Share This Page