GridView Column Width

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
 
E

Eliyahu Goldin

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.
 
S

Samuel Shulman

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
 

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,772
Messages
2,569,593
Members
45,112
Latest member
BrentonMcc
Top