Solved

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

Posted on 2011-02-10
6
331 Views
Last Modified: 2012-05-11
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.
0
Comment
Question by:lapucca
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 

Author Comment

by:lapucca
ID: 34864688
sorry, forgot to attach files.
DataList.txt
COI.JPG
0
 

Author Comment

by:lapucca
ID: 34864943
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.
0
 

Author Comment

by:lapucca
ID: 34864983
Ok, found the comma but still not able to solve the spacing problem.
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 17

Expert Comment

by:Jesse Houwing
ID: 34869747
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.
0
 

Author Comment

by:lapucca
ID: 34873320
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.
0
 
LVL 17

Accepted Solution

by:
Jesse Houwing earned 500 total points
ID: 34879444
It should be very simple to just create your ons webcontrol and take full control of the HTML generation.

Have a look at the following article(s) for a couple of ideas:
http://aspalliance.com/articleViewer.aspx?aId=350&pId=-1
http://aspalliance.com/345
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question