Link to home
Start Free TrialLog in
Avatar of lapucca
lapucca

asked on

Using DataList, why the data sometimes display with a big gap to the left

Hi, I'm using C#, asp.net 3.5
Can I fix this or should I use a different control?  The datalist gets translated to be another Table inside of the parent table in html source view.  Look odd.  Also, The data also seems to be higher of 1//2 of a row height when there is a 2nd row to be listed.  
Thank you.
Avatar of lapucca
lapucca

ASKER

sorry, forgot to attach files.
DataList.txt
COI.JPG
Avatar of lapucca

ASKER

Also, where and how is that comma added in front of the name when there is more than 1 to be listed?  I cannot find it in my code or sp?  Thank you.
Avatar of lapucca

ASKER

Ok, found the comma but still not able to solve the spacing problem.
Avatar of Jesse Houwing
because you're using relative sizes of the table columns, the first column will grow with the size of the second column. So as more people are added to the list, the second column increases in size (the repeater is set to grow horizontally). the 1st column is set to always be 1/3rd of the size of the second column (25%/75%), so the 1st column increases in size.

If you want to solve this, either specify a width on the encapsulating table, or set the width of the 1st column to a fixed width and don't specify a width on the 2nd column at all.
Avatar of lapucca

ASKER

I tried both but still get funny extra spacing here and there. I rid of percent and gavei 1st column a 10em width.  I then got rid of both column width.  I gave the Datalist a width of 4in.  both didn't work.  Should I just try some other control to do this?  I basicaly wants to list 2 names per line.  Thank you.
ASKER CERTIFIED SOLUTION
Avatar of Jesse Houwing
Jesse Houwing
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial