Solved

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

Posted on 2011-02-10
6
325 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
  • 4
  • 2
6 Comments
 

Author Comment

by:lapucca
Comment Utility
sorry, forgot to attach files.
DataList.txt
COI.JPG
0
 

Author Comment

by:lapucca
Comment Utility
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
Comment Utility
Ok, found the comma but still not able to solve the spacing problem.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 17

Expert Comment

by:ToAoM
Comment Utility
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
Comment Utility
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:
ToAoM earned 500 total points
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now