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

  • Thread starter Thread starter Rick Spiewak
  • Start date Start date
R

Rick Spiewak

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....)
 
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."
 
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.
 
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.
 
Back
Top