Making DataGrid Items not wrap text

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

What's the secret DataGrid property I need to set in order to prevent items
from wrapping text?
 
Hi, Dan,

The properties ItemStyle, SelectedItemStyle, AlternatingItemStyle,
EditItemStyle, HeaderStyle and FooterStyle expose an instance of type
TableItemStyle. Set the Wrap property on it to false to prevent wrapping.
i.e.

dataGrid1.ItemStyle.Wrap = false;

or

<asp:datagrid id="dataGrid1" runat="server"
itemstyle-wrap="false" .... />

Hope this helps
Martin
 
Back
Top