Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > RE: wrap property in a datagrid with autocoulmns

Reply
Thread Tools

RE: wrap property in a datagrid with autocoulmns

 
 
Diego
Guest
Posts: n/a
 
      11-26-2004
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...b;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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
To wrap or not to wrap? Aaron Fude Java 12 05-10-2008 06:33 PM
Wrap computer components in bubble wrap? Ickshka Computer Support 7 05-05-2006 05:54 PM
Text::Wrap::wrap difference Art Werschulz Perl Misc 1 09-25-2003 06:15 PM
Text::Wrap::wrap difference Art Werschulz Perl Misc 0 09-22-2003 02:36 PM
WRAP property in DataGrid doesn't work in IE GrumpyDev ASP .Net Web Controls 0 09-12-2003 06:41 PM



Advertisments