RE: wrap property in a datagrid with autocoulmns

Discussion in 'ASP .Net' started by Diego, Nov 26, 2004.

  1. Diego

    Diego Guest

    Hi, there's a bug in ASP.NET in the way it controls the nowrap property for
    a datagrid. I posted a message a few days ago asking if somebody had a
    solution to this without response. There's an artice on msdn that solves the
    bug for datagrids where there autocolumns is not enabled.
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;323169

    Unfortunatly it odesn't work for autocolumns enabled datagrids... I figured
    out a way to doy it using the ItemDataBound event of the datagrid.
    Here's the code that do the trick:

    Dim i As Integer

    For i = 0 To e.Item.Cells.Count() - 1

    e.Item.Cells(i).Attributes.Add("nowrap", "nowrap")

    Next

    I hope this helps, I haven't found any good place where this is solved.
     
    Diego, Nov 26, 2004
    #1
    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. =?Utf-8?B?S2V2aW4=?=
    Replies:
    2
    Views:
    510
    =?Utf-8?B?S2V2aW4=?=
    Jul 20, 2007
  2. Aaron Fude

    To wrap or not to wrap?

    Aaron Fude, May 8, 2008, in forum: Java
    Replies:
    12
    Views:
    717
    Chronic Philharmonic
    May 10, 2008
  3. GrumpyDev

    WRAP property in DataGrid doesn't work in IE

    GrumpyDev, Sep 12, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    153
    GrumpyDev
    Sep 12, 2003
  4. Art Werschulz

    Text::Wrap::wrap difference

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

    Text::Wrap::wrap difference

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

Share This Page