Has anyone got ellipses working in a gridview or detailsview?

Discussion in 'ASP .Net' started by RCS, Dec 2, 2005.

  1. RCS

    RCS Guest

    Perhaps you are familiar with the old:

    <nobr style="OVERFLOW:hidden;width:100px;TEXT-OVERFLOW:ellipsis">blah blah
    blahblah blah blah blah</nobr>

    technique.. Well, within a gridview, if I use this technique for a field, it
    just sort of ignores it. If I isolate out this line in a seperate .html
    file, it works as expected. Also, if I do a view source on the resultant
    output from my .aspx page - it seems like it should work. For example, here
    is the output:

    <td nowrap="nowrap">
    <nobr style="OVERFLOW:hidden;WIDTH:7­5px;TEXT-OVERFLOW:ellipsis"><a
    href="RequestDetail.aspx?Request_ID=5">this is a long link that should be
    shortened with ellipses at 75px, but it's not</a></nobr>
    </td>

    I've tried putting the logic into a css class and apply an ItemStyle for
    it - also have tried nesting this different ways:

    <span><nobr><a href></a></nobr>
    <a href><nobr></nobr></a>

    etc, etc... Anyone get this working or know of how I can?? Thanks much!
     
    RCS, Dec 2, 2005
    #1
    1. Advertising

  2. RCS

    Guest

    1. you'll probably want to handle the ItemDataBound event, and manually
    put in the nobr and link there, in the correct order

    2. i tried that technique and it didn't seem to work in Firefox. Is
    there an xbrowser way to do it?

    thx

    Neil
     
    , Dec 2, 2005
    #2
    1. Advertising

  3. RCS

    RCS Guest

    Ugh. Well, after literally disassembling the output to almost 8 lines of
    code - it turns out this line at the top:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    Which I still don't know, what it does - if that line is present, this
    feature breaks... just in case someone else runs across this...


    "RCS" <> wrote in message
    news:m%_jf.2841$...
    > Perhaps you are familiar with the old:
    >
    > <nobr style="OVERFLOW:hidden;width:100px;TEXT-OVERFLOW:ellipsis">blah blah
    > blahblah blah blah blah</nobr>
    >
    > technique.. Well, within a gridview, if I use this technique for a field,
    > it just sort of ignores it. If I isolate out this line in a seperate .html
    > file, it works as expected. Also, if I do a view source on the resultant
    > output from my .aspx page - it seems like it should work. For example,
    > here is the output:
    >
    > <td nowrap="nowrap">
    > <nobr style="OVERFLOW:hidden;WIDTH:7­5px;TEXT-OVERFLOW:ellipsis"><a
    > href="RequestDetail.aspx?Request_ID=5">this is a long link that should be
    > shortened with ellipses at 75px, but it's not</a></nobr>
    > </td>
    >
    > I've tried putting the logic into a css class and apply an ItemStyle for
    > it - also have tried nesting this different ways:
    >
    > <span><nobr><a href></a></nobr>
    > <a href><nobr></nobr></a>
    >
    > etc, etc... Anyone get this working or know of how I can?? Thanks much!
    >
    >
     
    RCS, Dec 2, 2005
    #3
  4. RCS

    Jeff User Guest

    I think the
    //W3C//DTD XHTML 1.0 Trans...etc, etc...
    refers to the standard by which the document should conform. Perhaps
    <nobr> is not supported in that standard.
    I would also be interested if anyone has any more info.
    Jeff

    On Fri, 02 Dec 2005 17:50:46 GMT, "RCS" <> wrote:

    >Ugh. Well, after literally disassembling the output to almost 8 lines of
    >code - it turns out this line at the top:
    ><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    >"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    >
    >Which I still don't know, what it does - if that line is present, this
    >feature breaks... just in case someone else runs across this...
    >
    >
    >"RCS" <> wrote in message
    >news:m%_jf.2841$...
    >> Perhaps you are familiar with the old:
    >>
    >> <nobr style="OVERFLOW:hidden;width:100px;TEXT-OVERFLOW:ellipsis">blah blah
    >> blahblah blah blah blah</nobr>
    >>
    >> technique.. Well, within a gridview, if I use this technique for a field,
    >> it just sort of ignores it. If I isolate out this line in a seperate .html
    >> file, it works as expected. Also, if I do a view source on the resultant
    >> output from my .aspx page - it seems like it should work. For example,
    >> here is the output:
    >>
    >> <td nowrap="nowrap">
    >> <nobr style="OVERFLOW:hidden;WIDTH:7­5px;TEXT-OVERFLOW:ellipsis"><a
    >> href="RequestDetail.aspx?Request_ID=5">this is a long link that should be
    >> shortened with ellipses at 75px, but it's not</a></nobr>
    >> </td>
    >>
    >> I've tried putting the logic into a css class and apply an ItemStyle for
    >> it - also have tried nesting this different ways:
    >>
    >> <span><nobr><a href></a></nobr>
    >> <a href><nobr></nobr></a>
    >>
    >> etc, etc... Anyone get this working or know of how I can?? Thanks much!
    >>
    >>

    >
     
    Jeff User, Dec 2, 2005
    #4
    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. Nathan Sokalski

    Why so much trouble with ellipses?

    Nathan Sokalski, Jan 13, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    344
    Peter Proost
    Jan 17, 2006
  2. Erik Zawadzki

    Recursive Calls with Ellipses

    Erik Zawadzki, Nov 12, 2004, in forum: C++
    Replies:
    1
    Views:
    310
    Victor Bazarov
    Nov 12, 2004
  3. Erik Zawadzki

    Recursive Calls with Ellipses

    Erik Zawadzki, Nov 12, 2004, in forum: C Programming
    Replies:
    2
    Views:
    380
    Eric Sosman
    Nov 12, 2004
  4. hyperboogie
    Replies:
    18
    Views:
    404
    David Thompson
    Apr 15, 2007
  5. Andrew Poulos

    Drawing ellipses with Canvas

    Andrew Poulos, Oct 18, 2006, in forum: Javascript
    Replies:
    5
    Views:
    112
    Martin Honnen
    Oct 20, 2006
Loading...

Share This Page