Fixing the format of my datagrid

Ask a Question related to ASP.NET Data Grid Control, Design and Development.

  1. #1

    Default Fixing the format of my datagrid

    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 Guest

  2. Similar Questions and Discussions

    1. Format DataGrid Row
      I am creating an email like application that makes use of a datagrid with "From", "Subject", and "Date" columns. If the user has yet to click on a...
    2. How can I format a telephone # in the datagrid
      The telephone # is my database is in nnnnnnnnnn format. When I bind it, it shows the same hard to read format in the datagrid. How can I make it...
    3. How can I save the style of a datagrid so that it appears on the automatic format to use iin another datagrid?
      How can I save the style of a datagrid so that it appears on the automatic format to use iin another datagrid?
    4. Format datagrid in code behind
      In my code behind I add a coloumn to a datgrid : lBlockUsedUp.DataField = "BlockUsedUp" lBlockUsedUp.HeaderText = "Blocks Used Up"...
    5. Format Dates in DataGrid
      Try this: <%# DataBinder.Eval(Container.DataItem, "FieldName", "{0:d}") %> Here's more details:...
  3. #2

    Default Re: Fixing the format of my datagrid

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

    "daniel kurtz" <dkurtz@ameritech.net> wrote in message
    news:umBVdRbzFHA.3408@TK2MSFTNGP09.phx.gbl...
    > 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 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139