By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,009 Members | 1,487 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,009 IT Pros & Developers. It's quick & easy.

True fixed-width columns in DataGrid

P: n/a
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 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
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"TPSreport" <ms***@e-tsi.net> wrote in message news:<04****************************@phx.gbl>...
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 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


It seems to ignore the fixed column widths set by property builder if
Showheader = false on the DataGrid.
Jul 19 '05 #2

P: n/a
-----Original Message-----
"TPSreport" <ms***@e-tsi.net> wrote in message news:<04****************************@phx.gbl>...
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 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


It seems to ignore the fixed column widths set by

property builder ifShowheader = false on the DataGrid.
.
Hmmm...I do have showheader = "True" and the fixed

widths are ignored.
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.