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

  • Thread starter Thread starter Keithb
  • Start date Start date
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
 
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
 
Back
Top