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

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top