Click to See Complete Forum and Search --> : Problem with the width of the columns of the datagrids


Raquel
August 19th, 2005, 05:41 AM
Hi everybody,

I am doing a discussion forum, and I would like to know how you can control the width of a datagrid column.

I mean, if i have set a width of 300px and a user inserts me a text without blanks that the width is bigger than 300px, the datagrid grows.

What is the code i have to put in the grid?

Thanks.

cmiskow
August 21st, 2005, 09:25 AM
They way I solve this is to wrap each cell's text in a div tag with width = Column Width - (Cell Padding * 2) and overflow: hidden

aquafin
August 21st, 2005, 10:19 PM
try setting the syle attribute of the datagrid to fixed


style="TABLE-LAYOUT:fixed;"