Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
Jack Peacock #1
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
-
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... -
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... -
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... -
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... -
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 '=',... -
Ken Cox [Microsoft MVP] #2
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
-
Jack Peacock #3
Re: hyphenation in column text
"Ken Cox [Microsoft MVP]" <BANSPAMken_cox@sympatico.ca> wrote in message
news:emyGqKF8DHA.3448@TK2MSFTNGP09.phx.gbl...That was the obvious thing to do, but it doesn't work. I disabled word wrap> It sounds like you want to tell the datagrid to use nowrap for the
> tablecell(s). Would that work?
>
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
-
Jack Peacock #4
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
-
Jack Peacock #5
Re: hyphenation in column text (SOLVED)
"Jack Peacock" <peacock@simconv.com> wrote in message
news:eDJgjHL8DHA.2168@TK2MSFTNGP12.phx.gbl...wrap> "Ken Cox [Microsoft MVP]" <BANSPAMken_cox@sympatico.ca> wrote in message
> news:emyGqKF8DHA.3448@TK2MSFTNGP09.phx.gbl...> That was the obvious thing to do, but it doesn't work. I disabled word> > It sounds like you want to tell the datagrid to use nowrap for the
> > tablecell(s). Would that work?
> >Problem solved with much experimentation. It turns out that the dash was> 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.
>
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
-
Ken Cox [Microsoft MVP] #6
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...> wrap>> "Ken Cox [Microsoft MVP]" <BANSPAMken_cox@sympatico.ca> wrote in message
>> news:emyGqKF8DHA.3448@TK2MSFTNGP09.phx.gbl...>> That was the obvious thing to do, but it doesn't work. I disabled word>> > It sounds like you want to tell the datagrid to use nowrap for the
>> > tablecell(s). Would that work?
>> >> Problem solved with much experimentation. It turns out that the dash was>> 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.
>>
> 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
-
Alvin Bruney [MVP] #7
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...column> 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' thethe> 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 towraps.> 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 stillas> 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> of end of January.
> Jack Peacock
>
>
Alvin Bruney [MVP] Guest



Reply With Quote

