473,397 Members | 2,033 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,397 software developers and data experts.

Setting column widths in DataList?

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 when the user is looking at the data,
the columns move back and forth among the DataLists. I don't know how well
this will appear in text, but it looks something like:

XXX XXXXX XXXXX
XXX XXXX XXXXX
XXX XXXXX XXXX

Where it should look like:
XXX XXXXX XXXXX
XXX XXXXX XXXXX
XXX XXXXX XXXXX

What I need is to be able to tell each DataList to make it's columns a fixed
width so that all three datalist have the same column sizes. I can't put all
of the data into a single datalist because I need to have a unique header
above each datalist.

Is this possible? Or am I going about this the wrong way?

Thanks for any info!
Nov 19 '05 #1
1 2549
There is no way to force the browser to show 3 different tables with the
same column width. You don't have full control over column widths, the
browser considers your instructions as recommendations. You have to put all
the datalists inside the same table and solve the header problem. You might
want to merge 3 datasources in 1 with header records in between, then in
ItemDataBound event catch the header records and format them differently.

Eliyahu

"Rachel Devons" <no*****@nononon.com> wrote in message
news:el**************@TK2MSFTNGP14.phx.gbl...
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 when the user is looking at the data, the columns move back and forth among the DataLists. I don't know how well
this will appear in text, but it looks something like:

XXX XXXXX XXXXX
XXX XXXX XXXXX
XXX XXXXX XXXX

Where it should look like:
XXX XXXXX XXXXX
XXX XXXXX XXXXX
XXX XXXXX XXXXX

What I need is to be able to tell each DataList to make it's columns a fixed width so that all three datalist have the same column sizes. I can't put all of the data into a single datalist because I need to have a unique header
above each datalist.

Is this possible? Or am I going about this the wrong way?

Thanks for any info!

Nov 19 '05 #2

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

Similar topics

3
by: cpt | last post by:
I read that if one uses "table-layout:fixed" then table rendering is speeded by setting row height. All my rows are 285 px high. 1) Is this true? 2) If true, how does one set row-height for the...
1
by: Will | last post by:
I have a combo box on a form which is based on table tblMachine. On that combo box I have four columns visible MachineNumber, description, location and type. The bound column is the MachineNumber...
5
by: nimdez | last post by:
Hi, I am working on an existing code base in which a lot of data displayed to the user is formatted in tables. Most tables are printed row-by-row using printf() with "%s" print conversion...
6
by: cr113 | last post by:
I'm trying to set the column widths for a datagrid. You'd think it would be easy. I looked it up in google and the first thing I found looked promising: datagrid1.columns(0).width = 2000...
4
by: Rich | last post by:
Hello, I have a one datagrid that will be based on different datatables. One datatable may have 7 columns, another 15... With the tables that have more columns, I have been manually dragging...
5
by: Steve Bugden | last post by:
Hi, I would like to set the column widths in the ASP.NET GridView control at runtime I have tried the following: http://msdn2.microsoft.com/en-us/library/ms178296.aspx Which uses the...
4
by: Chuck | last post by:
I'm setting the column with for a gridview (25+- columns) and have paging turned on. When the gridview is first displayed, the column widths are all set to the default. But after paging to...
2
by: Midsomer | last post by:
Hi. I have an Access database with a form containing 4 datasheets and I allow the user to change column widths. On closing the form, a routine is fired that saves each column width to an INI file....
3
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
I am wondering what is considered a best practice for setting column widths to fit the data for a DataGridView (.Net 2.0) that was created on-the-fly from an arbitrary query. What I would probably...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.