hyphenation in column text

Ask a Question related to ASP.NET Data Grid Control, Design and Development.

  1. #1

    Default hyphenation in column text

    I have a datagrid that displays records from a JET 4 (Access XP) database.
    It works fine but in columns where a "-" is embedded in the text, like
    serial numbers in the format 123-456, apparently the datagrid control
    converts the "-" plain hyphen into an HTML soft hyphen, forcing the text
    into two lines. Is there a way to stop or work around this?
    Jack Peacock


    Jack Peacock Guest

  2. Similar Questions and Discussions

    1. Two-column text inside one-column text box?
      Hello everybody, I'm working on a small size book with a one-column text box threaded through the whole thing. There are some short lists that I'd...
    2. Hyphenation and Text Box problems
      I am very very new to InDesign. I just got it yesterday version 3.0 and I'm running on a Dell Dimension XPS 81000r, Intel 1 GHz machine, 128 MB ram...
    3. Image in header column (not replacing column header text)
      I have a sortable (asc/desc) datagrid and would like to add a small arrow icon (down/up) next to the column header text to improve the UI. Is this...
    4. Q: Get Text from Hyperlink Column
      Hi, I have a column in my DataGrid which is a Hyperlink Column. Everything work find except when I try to get the text of the column using...
    5. Was the text column changed?
      I have a trigger on update, but i need to know if a specified column of the data type TEXT was changed or not. Since it's TEXT, i cannot use '=',...
  3. #2

    Default Re: hyphenation in column text

    It sounds like you want to tell the datagrid to use nowrap for the
    tablecell(s). Would that work?


    "Jack Peacock" <peacock@simconv.com> wrote in message
    news:%23WbOVZ17DHA.2812@TK2MSFTNGP11.phx.gbl...
    >I have a datagrid that displays records from a JET 4 (Access XP) database.
    > It works fine but in columns where a "-" is embedded in the text, like
    > serial numbers in the format 123-456, apparently the datagrid control
    > converts the "-" plain hyphen into an HTML soft hyphen, forcing the text
    > into two lines. Is there a way to stop or work around this?
    > Jack Peacock
    >
    >
    Ken Cox [Microsoft MVP] Guest

  4. #3

    Default Re: hyphenation in column text

    "Ken Cox [Microsoft MVP]" <BANSPAMken_cox@sympatico.ca> wrote in message
    news:emyGqKF8DHA.3448@TK2MSFTNGP09.phx.gbl...
    > It sounds like you want to tell the datagrid to use nowrap for the
    > tablecell(s). Would that work?
    >
    That was the obvious thing to do, but it doesn't work. I disabled word wrap
    for all columns, no luck. My guess is that the process of rendering the
    data into XML converts dashes embedded in text into soft hyphens, which
    forces a break in HTML when it goes out to the browser.
    Jack Peacock


    Jack Peacock Guest

  5. #4

    Default More on hyphenation in column text

    Here is an example of the text wrap problem:
    <asp:BoundColumn DataField="SlotID" SortExpression="SlotID"
    ReadOnly="True" HeaderText="Serial #">
    < ItemStyle Wrap="False" Height="20px" Width="60px"></ItemStyle>
    </asp:BoundColumn>

    This column in the datagrid works fine if the text does not contain an
    embedded '-' dash. If a dash is present, for instance '87654-2' the column
    in the datagrid will break after the '-', putting the '2' on a second line
    even though wrap is turned off.

    Has anyone else seen this behavior in tables or datagrids? According to the
    HTML 4 manual a plain hyphen (the '-' dash) should not cause a line break.

    The MS knowledge base indicates there is a bug in datagrids regarding word
    wrap (323169). It indicates wrap should be turned off in the ItemStyle
    entry instead of the row, which I put in as above, but the text still wraps.
    Has anyone else seen this problem? It can be duplicated with <td> HTML
    entries outside a datagrid. I'm using VS 2003 and Framework 1.1 updated as
    of end of January.
    Jack Peacock


    Jack Peacock Guest

  6. #5

    Default Re: hyphenation in column text (SOLVED)

    "Jack Peacock" <peacock@simconv.com> wrote in message
    news:eDJgjHL8DHA.2168@TK2MSFTNGP12.phx.gbl...
    > "Ken Cox [Microsoft MVP]" <BANSPAMken_cox@sympatico.ca> wrote in message
    > news:emyGqKF8DHA.3448@TK2MSFTNGP09.phx.gbl...
    > > It sounds like you want to tell the datagrid to use nowrap for the
    > > tablecell(s). Would that work?
    > >
    > That was the obvious thing to do, but it doesn't work. I disabled word
    wrap
    > for all columns, no luck. My guess is that the process of rendering the
    > data into XML converts dashes embedded in text into soft hyphens, which
    > forces a break in HTML when it goes out to the browser.
    >
    Problem solved with much experimentation. It turns out that the dash was
    misleading. The text break was casued by the string not fitting into the
    preset width. Since a line break was needed the logical place to split the
    text was at the dash. The datagrid control applied this to every column
    with a dash, even though only one element did not fit. Once I made the
    column width larger the wrap disappeared.

    The unexpected behavior was that 1) the "wrap" style element didn't control
    this behavior, and 2) it was applied to every row, including those that did
    not need to be wrapped.
    Jack Peacock


    Jack Peacock Guest

  7. #6

    Default Re: hyphenation in column text (SOLVED)

    Hi Jack,

    Thanks for reporting back. Somewhere down the road, someone with the same
    problem with search the issue, hit this thread and find out what to do.

    Ken

    "Jack Peacock" <peacock@simconv.com> wrote in message
    news:u9ywPqc8DHA.1640@TK2MSFTNGP11.phx.gbl...
    > "Jack Peacock" <peacock@simconv.com> wrote in message
    > news:eDJgjHL8DHA.2168@TK2MSFTNGP12.phx.gbl...
    >> "Ken Cox [Microsoft MVP]" <BANSPAMken_cox@sympatico.ca> wrote in message
    >> news:emyGqKF8DHA.3448@TK2MSFTNGP09.phx.gbl...
    >> > It sounds like you want to tell the datagrid to use nowrap for the
    >> > tablecell(s). Would that work?
    >> >
    >> That was the obvious thing to do, but it doesn't work. I disabled word
    > wrap
    >> for all columns, no luck. My guess is that the process of rendering the
    >> data into XML converts dashes embedded in text into soft hyphens, which
    >> forces a break in HTML when it goes out to the browser.
    >>
    > Problem solved with much experimentation. It turns out that the dash was
    > misleading. The text break was casued by the string not fitting into the
    > preset width. Since a line break was needed the logical place to split
    > the
    > text was at the dash. The datagrid control applied this to every column
    > with a dash, even though only one element did not fit. Once I made the
    > column width larger the wrap disappeared.
    >
    > The unexpected behavior was that 1) the "wrap" style element didn't
    > control
    > this behavior, and 2) it was applied to every row, including those that
    > did
    > not need to be wrapped.
    > Jack Peacock
    >
    >
    Ken Cox [Microsoft MVP] Guest

  8. #7

    Default Re: More on hyphenation in column text

    have you tried wrapping the entire contents in brackets?

    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    [url]http://tinyurl.com/3he3b[/url]
    "Jack Peacock" <peacock@simconv.com> wrote in message
    news:%234jgZIR8DHA.2640@TK2MSFTNGP10.phx.gbl...
    > Here is an example of the text wrap problem:
    > <asp:BoundColumn DataField="SlotID" SortExpression="SlotID"
    > ReadOnly="True" HeaderText="Serial #">
    > < ItemStyle Wrap="False" Height="20px" Width="60px"></ItemStyle>
    > </asp:BoundColumn>
    >
    > This column in the datagrid works fine if the text does not contain an
    > embedded '-' dash. If a dash is present, for instance '87654-2' the
    column
    > in the datagrid will break after the '-', putting the '2' on a second line
    > even though wrap is turned off.
    >
    > Has anyone else seen this behavior in tables or datagrids? According to
    the
    > HTML 4 manual a plain hyphen (the '-' dash) should not cause a line break.
    >
    > The MS knowledge base indicates there is a bug in datagrids regarding word
    > wrap (323169). It indicates wrap should be turned off in the ItemStyle
    > entry instead of the row, which I put in as above, but the text still
    wraps.
    > Has anyone else seen this problem? It can be duplicated with <td> HTML
    > entries outside a datagrid. I'm using VS 2003 and Framework 1.1 updated
    as
    > of end of January.
    > Jack Peacock
    >
    >

    Alvin Bruney [MVP] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139