How to make a GridView item label wrap on long text strings?

K

Keithb

I have a GridView control with two item template columns, each containing a
label control. One of the label controls wraps on long text strings,
increasing the height of the row. The other one does not wrap. Instead, it
makes the label column extremely wide so that it extends outside the browser
window. How can I make this column wrap the way the other one does?

Thanks,

Keith
 
S

Siva M

Did you try specifying the wrap property?

<asp:GridView runat="server" ID="d">
<Columns>
<asp:TemplateField>
<ItemStyle Wrap="true" />
</asp:TemplateField>
</Columns>
</asp:GridView>

I have a GridView control with two item template columns, each containing a
label control. One of the label controls wraps on long text strings,
increasing the height of the row. The other one does not wrap. Instead, it
makes the label column extremely wide so that it extends outside the browser
window. How can I make this column wrap the way the other one does?

Thanks,

Keith
 

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

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top