473,385 Members | 1,397 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,385 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 2545
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.