468,248 Members | 1,533 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,248 developers. It's quick & easy.

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 2290
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by cpt | last post: by
5 posts views Thread by Steve Bugden | last post: by
4 posts views Thread by Chuck | last post: by
3 posts views Thread by =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.