Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > prevent cell wrap

Reply
Thread Tools

prevent cell wrap

 
 
Bobby
Guest
Posts: n/a
 
      04-02-2004

Hi,

I have a control that inherits from datagrid that has resizable columns.
when a column is sized smaller than the text length the overflow
attribute kicks in and displays an ellipsis for the hidden text.

My problem is that the text wraps unless I have a <nobr> tag in the
cell. I've tried <td nowrap>, <td nowrap="nowrap"> and adding it to the
style. The only thing that seems to work is <nobr> in the cell.

The problem is that I have to intercept the output and add the tag to
each cell, which is a bad way to do this. If I add the tag on the
InitializeCell() it gets overwritten later.

how can I set each cell in my grid to have this tag when it's written to
the browser; or how can I get nowrap to work properly?


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Bruce
Guest
Posts: n/a
 
      04-28-2004
1. Create a class in your style sheet as this:
..result TD
{
WHITE-SPACE: nowrap
}

2. Apply this class to the datagrid as:
<ASPataGrid
id="ResultGrid"
runat="server"
cssclass="result"
/>



Bobby <> wrote in message news:<#>...
> Hi,
>
> I have a control that inherits from datagrid that has resizable columns.
> when a column is sized smaller than the text length the overflow
> attribute kicks in and displays an ellipsis for the hidden text.
>
> My problem is that the text wraps unless I have a <nobr> tag in the
> cell. I've tried <td nowrap>, <td nowrap="nowrap"> and adding it to the
> style. The only thing that seems to work is <nobr> in the cell.
>
> The problem is that I have to intercept the output and add the tag to
> each cell, which is a bad way to do this. If I add the tag on the
> InitializeCell() it gets overwritten later.
>
> how can I set each cell in my grid to have this tag when it's written to
> the browser; or how can I get nowrap to work properly?
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

 
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
Prevent RadioButton Item word wrap Eric ASP .Net Web Controls 5 05-26-2004 01:28 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



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57