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. Advertisements

  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. Advertisements

  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. Advertisements

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. Diego

    Wrap text in datagrid

    Diego, Nov 26, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    9,101
    Jeffrey Palermo [MCP]
    Nov 29, 2004
  2. Scott Steiner
    Replies:
    0
    Views:
    3,049
    Scott Steiner
    Jul 5, 2005
  3. dorayme
    Replies:
    27
    Views:
    1,300
    Jonathan N. Little
    Mar 21, 2006
  4. =?Utf-8?B?Z2xlbm4=?=

    Cannot get text in certain cells of DataGrid to wrap

    =?Utf-8?B?Z2xlbm4=?=, Jun 15, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    518
    =?Utf-8?B?Z2xlbm4=?=
    Jun 15, 2006
  5. Aaron Fude

    To wrap or not to wrap?

    Aaron Fude, May 8, 2008, in forum: Java
    Replies:
    12
    Views:
    1,036
    Chronic Philharmonic
    May 10, 2008
  6. Henrik
    Replies:
    1
    Views:
    659
    Ken Cox [Microsoft MVP]
    Jul 6, 2006
  7. Art Werschulz

    Text::Wrap::wrap difference

    Art Werschulz, Sep 22, 2003, in forum: Perl Misc
    Replies:
    0
    Views:
    453
    Art Werschulz
    Sep 22, 2003
  8. Art Werschulz

    Text::Wrap::wrap difference

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