GridView Column Width

  • Thread starter Thread starter Samuel Shulman
  • Start date Start date
S

Samuel Shulman

The GridView show an image that takes say 75px in height then I set the next
column to 200px wide because I don't want the text to wrap

However it still wraps the text and the width of the columns remain far less
than 200px

Is there any way to force the width of a column

Below is the code:


<asp:BoundField DataField="Description" SortExpression="Description"
ItemStyle-Width="220px"/>



Thank you,

Samuel
 
If you don't want the text to wrap, apply css rule white-space:nowrap. I
think there is also Wrap property in ItemStyle class that you can use.
 
Thank you

I want to set a minimum width I may however have to wrap the text in case it
required more space

Samuel

Eliyahu Goldin said:
If you don't want the text to wrap, apply css rule white-space:nowrap. I
think there is also Wrap property in ItemStyle class that you can use.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]


Samuel Shulman said:
The GridView show an image that takes say 75px in height then I set the
next column to 200px wide because I don't want the text to wrap

However it still wraps the text and the width of the columns remain far
less than 200px

Is there any way to force the width of a column

Below is the code:


<asp:BoundField DataField="Description" SortExpression="Description"
ItemStyle-Width="220px"/>



Thank you,

Samuel
 
Back
Top