DataList inside a Grid Layout Panel (<DIV>) item layout problem

Discussion in 'ASP .Net' started by Rick Spiewak, Aug 24, 2003.

  1. Rick Spiewak

    Rick Spiewak Guest

    I'm using a DataList inside a Grid Layout Panel (which ends up being a
    <DIV>) so that I can use the overflow:scroll property. This is working fine,
    except for one anomaly: If there aren't enough items to cause an overflow,
    and scrolling, they get spaced evenly inside the <DIV>. So, one item appears
    in the middle of the area, two spread out with space on top, between, and
    bottom, etc. Finally, after adding enough to fill the area, the spacing and
    positioning is as I would prefer to see it.

    Is there a way to change this behavior so that the <DIV> simply fills in
    from the top?

    (Also - possible warning note: My first attempt at this consisted of cutting
    & pasting the DataList into the Grid Layout panel. This resulted in
    *trashing* the HTML for my page. I was able to recover, but sure wished I
    had picked the point just before I did that to check in the source....)
     
    Rick Spiewak, Aug 24, 2003
    #1
    1. Advertising

  2. Rick Spiewak

    MSFT Guest

    You may change the DataList control's RepeatLayout to "Flow". When it is
    set to table, the item's layout will be arranged automatically.

    Luke

    "Microsoft Security Announcement: Have you installed the patch for
    Microsoft Security Bulletin MS03-026?? If not Microsoft strongly advises
    you to review the information at the following link regarding Microsoft
    Security Bulletin MS03-026
    http://www.microsoft.com/security/security_bulletins/ms03-026.asp and/or to
    visit Windows Update at http://windowsupdate.microsoft.com to install the
    patch. Running the SCAN program from the Windows Update site will help to
    insure you are current with all security patches, not just MS03-026."
     
    MSFT, Aug 25, 2003
    #2
    1. Advertising

  3. Rick Spiewak

    Rick Spiewak Guest

    And, we have a winner <g>. Yes, this works!, and without making a mess of
    the formatting (I already had manually inserted a <BR> where I wanted a line
    break, anyway).

    Thanks.

    "MSFT" <> wrote in message
    news:...
    > You may change the DataList control's RepeatLayout to "Flow". When it is
    > set to table, the item's layout will be arranged automatically.
    >
    > Luke
    >
    > "Microsoft Security Announcement: Have you installed the patch for
    > Microsoft Security Bulletin MS03-026?? If not Microsoft strongly advises
    > you to review the information at the following link regarding Microsoft
    > Security Bulletin MS03-026
    > http://www.microsoft.com/security/security_bulletins/ms03-026.asp and/or

    to
    > visit Windows Update at http://windowsupdate.microsoft.com to install the
    > patch. Running the SCAN program from the Windows Update site will help to
    > insure you are current with all security patches, not just MS03-026."
    >
     
    Rick Spiewak, Aug 26, 2003
    #3
  4. Rick Spiewak

    Rick Spiewak Guest

    This just controls whether the scroll bar(s) always appear (albeit grayed
    out) or not. Thanks. See my response to the MSFT comments by Luke.

    "Justin Dutoit" <> wrote in message
    news:uf%...
    > I've heard of overflow:auto being used, have you tried that?
    >
    > J
    >
    > "Rick Spiewak" <> wrote in message
    > news:...
    > > I'm using a DataList inside a Grid Layout Panel (which ends up being a
    > > <DIV>) so that I can use the overflow:scroll property. This is working

    > fine,
    > > except for one anomaly: If there aren't enough items to cause an

    overflow,
    > > and scrolling, they get spaced evenly inside the <DIV>. So, one item

    > appears
    > > in the middle of the area, two spread out with space on top, between,

    and
    > > bottom, etc. Finally, after adding enough to fill the area, the spacing

    > and
    > > positioning is as I would prefer to see it.
    > >
    > > Is there a way to change this behavior so that the <DIV> simply fills in
    > > from the top?
    > >
    > > (Also - possible warning note: My first attempt at this consisted of

    > cutting
    > > & pasting the DataList into the Grid Layout panel. This resulted in
    > > *trashing* the HTML for my page. I was able to recover, but sure wished

    I
    > > had picked the point just before I did that to check in the source....)
    > >
    > >

    >
    >
     
    Rick Spiewak, Aug 26, 2003
    #4
    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. HS1
    Replies:
    3
    Views:
    490
  2. HS1
    Replies:
    4
    Views:
    8,302
    Babu Kalakrishnan
    Dec 8, 2004
  3. Chris

    Grid Layout Panel and Panel in the Designer

    Chris, Aug 28, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    203
    Chris
    Aug 28, 2003
  4. Dwayne Madsen

    Q: Div A inside Div B is larger than Div B

    Dwayne Madsen, Jun 1, 2005, in forum: Javascript
    Replies:
    1
    Views:
    194
    David Dorward
    Jun 1, 2005
  5. 123Jim
    Replies:
    0
    Views:
    144
    123Jim
    May 16, 2011
Loading...

Share This Page