Fixing the format of my datagrid

Discussion in 'ASP .Net Datagrid Control' started by daniel kurtz, Oct 10, 2005.

  1. daniel kurtz

    daniel kurtz Guest

    My grid keeps dynamically resizing as I bind data to it. What I want is to
    display 10 rows, each with a fixed height... or if the particular page has
    fewer than 10 items, the actual number of items plus enough white space to
    fill out the equivelant of 10 rows (blank rows might be OK) and 6 columns,
    each with a fixed width. It is OK if extra long strings get truncated.

    I've played with all the formatting settings I can find, and the best I've
    managed to get is a grid that is always a minimum height. If I have enough
    rows to fill out this height, the rows display in the fixed height,
    otherwise the rows that are displayed are stretched to fit the grid. If I
    have 10 or more rows, the grid 'grows' to display 10 rows, with the height
    fixed. However, if the columns that are bound to text strings widen to
    accomodate the longest string. This causes the grid to resize and 'jump'...
    under some circumstances, though it doesn't seem to change the displayed
    height of the grid, it causes the controls situated BELOW the grid to scroll
    down the page. Most peculiar.

    Any suggestions appreciated.

    ddk
     
    daniel kurtz, Oct 10, 2005
    #1
    1. Advertising

  2. daniel kurtz

    daniel kurtz Guest

    OK, I've found that you can take care of the column-width thing by assigning
    the column a percent width value. This
    article->http://www.aspheute.com/english/20030909.asp purports to have a
    solution to the other issue, by programmatically filling out the grid with
    blank rows. Looks good.

    "daniel kurtz" <> wrote in message
    news:...
    > My grid keeps dynamically resizing as I bind data to it. What I want is to
    > display 10 rows, each with a fixed height... or if the particular page has
    > fewer than 10 items, the actual number of items plus enough white space to
    > fill out the equivelant of 10 rows (blank rows might be OK) and 6 columns,
    > each with a fixed width. It is OK if extra long strings get truncated.
     
    daniel kurtz, Oct 11, 2005
    #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. MS News

    Fixing an Id for a HTML Tag

    MS News, Jul 29, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    329
    Vincent V
    Jul 30, 2003
  2. Daves
    Replies:
    4
    Views:
    485
    Daves
    Mar 10, 2005
  3. Mohun Biswas

    fixing a mistaken toString() method

    Mohun Biswas, Aug 2, 2003, in forum: Java
    Replies:
    1
    Views:
    356
  4. Alex Hunsley
    Replies:
    4
    Views:
    512
    Toby Reyelts
    Oct 17, 2004
  5. Dale
    Replies:
    0
    Views:
    3,402
Loading...

Share This Page