473,387 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Set Column Width in DataList

I have a datalist that displays data from an SQL Server 2000 DB. One of the
fields contains names in the format "LastName FI". When the data is
displayed for that field it seems to base the width of the column on the
longest value of LastName which means I often get the lastname on one line
and the first initial on a second line (I guess is breaks on the space?)

How can I circumvent that second line? I tried adding code to set the column
width but it is not having any effect?

Wayne
Nov 18 '05 #1
3 4009
Try putting a <DIV> into the cell. Browsers tend to do whatever suits them
with tables.

"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:e8**************@TK2MSFTNGP09.phx.gbl...
I have a datalist that displays data from an SQL Server 2000 DB. One of the fields contains names in the format "LastName FI". When the data is
displayed for that field it seems to base the width of the column on the
longest value of LastName which means I often get the lastname on one line
and the first initial on a second line (I guess is breaks on the space?)

How can I circumvent that second line? I tried adding code to set the column width but it is not having any effect?

Wayne

Nov 18 '05 #2
Rick;

Sorry to be dense but I am not clear on how to use a <DIV> tag to prevent a
field from wrapping?

Wayne

"Rick Spiewak" <ri*********@mindspring.com> wrote in message
news:uV*************@TK2MSFTNGP09.phx.gbl...
Try putting a <DIV> into the cell. Browsers tend to do whatever suits them
with tables.

"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:e8**************@TK2MSFTNGP09.phx.gbl...
I have a datalist that displays data from an SQL Server 2000 DB. One of

the
fields contains names in the format "LastName FI". When the data is
displayed for that field it seems to base the width of the column on the
longest value of LastName which means I often get the lastname on one line and the first initial on a second line (I guess is breaks on the space?)

How can I circumvent that second line? I tried adding code to set the

column
width but it is not having any effect?

Wayne


Nov 18 '05 #3
Something like:
<DIV style="WIDTH: 100px">


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bigtoga | last post by:
Okay - I'm going crazy here trying to figure out how to do this - here goes: I have a DataList populated by a DataReader. In the DataReader, a column is present called "IsInCategory". I want to...
4
by: TomislaW | last post by:
is it possible to set width of ItemTemplate i tried to set like this: <ItemStyle Width='<% SomeProperty %>'></ItemStyle> i get error: '<% SomeProperty %>' can not be parsed as a unit as...
2
by: Derek | last post by:
I have a datalist that contains one unbound column with a checkbox. When the user clicks a button, I need to count all the checked boxes in the datalist. Can anyone give me an idea as to the best...
1
by: Rachel Devons | last post by:
All, I have a table with three rows, and within each row I have a DataList that is set to use 3 columns. The problem I'm having is that each DataList sets it's columns to be different widths so...
5
by: Ben Fidge | last post by:
I'm using DataList to present tabular data but am often having problems with some rows column alignment being out of synch with the rest of the rows. My DataList looks similar to this...: ...
2
by: Fabiano | last post by:
Please, i need to hide a Item(Collumn) of a DataList that is inside of another DataList based on some data that i my database returns. For a sample i created the code above, but it doesn't work....
0
by: ryan.d.rembaum | last post by:
I have posted q couple questions about databinding, but figured I'd simplify my questions and see if what I want to do is even possible. I have a database C:\mydatase.mdb In it there is a table...
3
by: trvlDev | last post by:
I am using ASP 2.0 connecting to a SQL database. I retrieve one field of data from one of the tables and return the results to the screen - currently into a DataList. Well, the column is now too...
3
by: Nathan Sokalski | last post by:
I am looking to create a multi-column list that is scrollable, kind of like a ListBox control, only I need a way to align the columns of text that I will have (I would use spaces, but because the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.