consistent column widths

T

TPSreport

ASP.NET 2003. Two DataGrids, six columns each, one grid
atop the other. I need to have the columns line up,
i.e., DataGrid1 Col(1) lined up w/ DataGrid2 Col(1) -
each the same width on the screen. All columns have the
same width assigned via Property Builder, and both
DataGrids themselves have the same total fixed width.
Wrap is OFF for each column item because I can only
afford the real estate for a single line; the users
should have to highlight and drag-right to see any hidden
text in a given cell.

However, the text in (say) col(2) is variable in size and
when the grids populate, col(2)'s width still expands or
contracts. So DataGrid1 Col(2) is a different width than
DataGrid2 Col(2) and it throws the alignment out of
whack - even though I've hardcoded the column and
DataGrid widths. Ideas? TIA.

TPS
 
M

Mike Moore [MSFT]

Hi,

You can do what you describe by placing text boxes inside each cell (with
readonly=true). Then you can size the text box to the width you prefer and
any overflow text will be cut off. Also, each line will be a single row
with no wrapping. Finally, a user can view overflow text by clicking inside
the text box and selecting the text.

Does this answer your question?

Thank you, Mike Moore
Microsoft, ASP.NET

This posting is provided "AS IS", with no warranties, and confers no rights.

--------------------
 
T

TPSreport

Mike,
Sorry; been away. That does answer it and I'll give it a
go. Thanks very much.
TPS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top