Making DataGrid Items not wrap text

Discussion in 'ASP .Net' started by Dan, Mar 2, 2004.

  1. Dan

    Dan Guest

    What's the secret DataGrid property I need to set in order to prevent items
    from wrapping text?
    Dan, Mar 2, 2004
    #1
    1. Advertising

  2. 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
    "Dan" <> wrote in message
    news:...
    > What's the secret DataGrid property I need to set in order to prevent

    items
    > from wrapping text?
    >
    >
    Martin Dechev, Mar 2, 2004
    #2
    1. Advertising

  3. Dan

    Tommy Guest

    Try this:

    <ItemStyle Wrap="False"></ItemStyle>

    Tommy,

    "Dan" <> wrote in message news:<>...
    > What's the secret DataGrid property I need to set in order to prevent items
    > from wrapping text?
    Tommy, Mar 2, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Scott Steiner
    Replies:
    0
    Views:
    2,615
    Scott Steiner
    Jul 5, 2005
  2. dorayme
    Replies:
    27
    Views:
    1,042
    Jonathan N. Little
    Mar 21, 2006
  3. Aaron Fude

    To wrap or not to wrap?

    Aaron Fude, May 8, 2008, in forum: Java
    Replies:
    12
    Views:
    680
    Chronic Philharmonic
    May 10, 2008
  4. Art Werschulz

    Text::Wrap::wrap difference

    Art Werschulz, Sep 22, 2003, in forum: Perl Misc
    Replies:
    0
    Views:
    215
    Art Werschulz
    Sep 22, 2003
  5. Art Werschulz

    Text::Wrap::wrap difference

    Art Werschulz, Sep 24, 2003, in forum: Perl Misc
    Replies:
    1
    Views:
    230
    Anno Siegel
    Sep 25, 2003
Loading...

Share This Page