Ask a Question related to ASP.NET, Design and Development.
-
Paps #1
Word Wrap
I've a DG and I've set all rows with WordWrap=false but when the cell text
is something like "Hello brave new world" the text wrap (for the white
space?).
How can i disable the wrap for everything ?
thanks Paps
Paps Guest
-
How do you word wrap a TextInput Label?
How do you word wrap a TextInput Label? It doesn't appear this can be done. I can word wrap like this: <mx:Text width="150" text="Third Party... -
help with a tabel word wrap
Hi Any one help me please below is the html I have. its reading a .js file from an external source. The problem is word wrapping the content I... -
Word Wrap - Two Line Label
I am using TabNavigator and I want the Tab Labels displayed on two lines. Can anyone offer some guidence. Thank You -
Default path word wrap.
I use InDesign to letter comic books. I make circular paths as bubbles, and put the dialogue for the comic book in the bubble. This works fine,... -
Dynamic text word wrap?
I am still fairly new at this, but I have a little problem in that text I load from a .txt file does not wrap around to the next line. The text just... -
Prasad #2
Re: Word Wrap
Hi
Setting WordWrap = false for Row does not server any purpose. you need
to set it for each and every col.
eg.
This will wrap the text in TD
<HTML>
<body>
<table width=100>
<tr nowrap>
<td >welcome to C# welcome to C# welcome to C# welcome to C#
welcome to C#</td>
</tr>
</table>
</body>
</HTML>
This wont
<HTML>
<body>
<table width=100>
<tr >
<td nowrap>welcome to C# welcome to C# welcome to C# welcome
to C# welcome to C#</td>
</tr>
</table>
</body>
</HTML>
HTH
Prasad
"Paps" <papettip@euroforex.com> wrote in message
news:#NS#DLwRDHA.1552@TK2MSFTNGP12.phx.gbl...> I've a DG and I've set all rows with WordWrap=false but when the cell text
> is something like "Hello brave new world" the text wrap (for the white
> space?).
> How can i disable the wrap for everything ?
>
> thanks Paps
>
>
Prasad Guest
-
Oleg Ogurok #3
Re: Word Wrap
I had the same problem but couldn't find a solution. I ended up replacing
each space with
Hello brave new world
"Paps" <papettip@euroforex.com> wrote in message
news:%23NS%23DLwRDHA.1552@TK2MSFTNGP12.phx.gbl...> I've a DG and I've set all rows with WordWrap=false but when the cell text
> is something like "Hello brave new world" the text wrap (for the white
> space?).
> How can i disable the wrap for everything ?
>
> thanks Paps
>
>
Oleg Ogurok Guest
-
news.pandora.be #4
word wrap
I want to display a string in a table but when a word in the string is
longer then 40 letters it won't wrap. Does anyone know how I can fix this ?
Thanx
Wannes
news.pandora.be Guest
-
Curt_C [MVP] #5
Re: word wrap
where would you expect it to wrap? if it's a single, uninterrupted, string
of characters the browser has no idea where to break it, besides it's not
right to break it most likely. You'll have to build a custom string reader
to insert a "<br>" or linebreak (if displayed in a textbox, etc).
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: [url]http://www.Darkfalz.com[/url]
Blog: [url]http://blog.Darkfalz.com[/url]
"news.pandora.be" <no@no.com> wrote in message
news:ed7qc.113060$f83.6457443@phobos.telenet-ops.be...?> I want to display a string in a table but when a word in the string is
> longer then 40 letters it won't wrap. Does anyone know how I can fix this>
> Thanx
>
> Wannes
>
>
Curt_C [MVP] Guest
-
news.pandora.be #6
Re: word wrap
And how would I have te do that ?
"Curt_C [MVP]" <software_AT_darkfalz.com> schreef in bericht
news:eGMCDrDPEHA.3476@TK2MSFTNGP09.phx.gbl...this> where would you expect it to wrap? if it's a single, uninterrupted, string
> of characters the browser has no idea where to break it, besides it's not
> right to break it most likely. You'll have to build a custom string reader
> to insert a "<br>" or linebreak (if displayed in a textbox, etc).
>
> --
> Curt Christianson
> Owner/Lead Developer, DF-Software
> Site: [url]http://www.Darkfalz.com[/url]
> Blog: [url]http://blog.Darkfalz.com[/url]
>
>
> "news.pandora.be" <no@no.com> wrote in message
> news:ed7qc.113060$f83.6457443@phobos.telenet-ops.be...> > I want to display a string in a table but when a word in the string is
> > longer then 40 letters it won't wrap. Does anyone know how I can fix> ?>> >
> > Thanx
> >
> > Wannes
> >
> >
>
news.pandora.be Guest
-
Aaron Bertrand [MVP] #7
Re: word wrap
What kind of word is longer than 40 letters? Where would it make sense to
break up such a word? Exactly in half, after 20 characters, after 32
characters, 5 characters from the end, ...?
--
Aaron Bertrand
SQL Server MVP
[url]http://www.aspfaq.com/[/url]
"news.pandora.be" <no@no.com> wrote in message
news:ed7qc.113060$f83.6457443@phobos.telenet-ops.be...>I want to display a string in a table but when a word in the string is
> longer then 40 letters it won't wrap. Does anyone know how I can fix this
> ?
>
> Thanx
>
> Wannes
>
>
Aaron Bertrand [MVP] Guest
-
news.pandora.be #8
Re: word wrap
It's in a sort of message board so I cant realy controle what will be
displayed in the table.
I have to make shure that if someone has put in such long words my table
will still be displayed as it should.
Therefor I'm looking for an ASP-code that places an "<BR>" into my string if
there are words longer than 40 letters in it. It doesn't realy matter to me
where the words are broken as long as they are.
gr.
Wannes
"Aaron Bertrand [MVP]" <aaron@TRASHaspfaq.com> schreef in bericht
news:O6j8V1DPEHA.1048@tk2msftngp13.phx.gbl...this> What kind of word is longer than 40 letters? Where would it make sense to
> break up such a word? Exactly in half, after 20 characters, after 32
> characters, 5 characters from the end, ...?
>
> --
> Aaron Bertrand
> SQL Server MVP
> [url]http://www.aspfaq.com/[/url]
>
>
>
>
>
> "news.pandora.be" <no@no.com> wrote in message
> news:ed7qc.113060$f83.6457443@phobos.telenet-ops.be...> >I want to display a string in a table but when a word in the string is
> > longer then 40 letters it won't wrap. Does anyone know how I can fix>> > ?
> >
> > Thanx
> >
> > Wannes
> >
> >
>
news.pandora.be Guest
-
Aaron Bertrand [MVP] #9
Re: word wrap
I would do something like this when you STORE the data (then you don't have
to do it every time you display it).
data = request.form("data")
datas = split(data, " ")
for i = 0 to ubound(datas)
if len(datas(i))>40 then
tmp = ""
for i = 1 to len(datas(i)) step 40
tmp = tmp & "<br>" & mid(str, i, 40)
next
datas(i) = tmp
end if
next
data = join(datas, " ")
' now replace single apostrophes with two, insert into db, etc.
--
Aaron Bertrand
SQL Server MVP
[url]http://www.aspfaq.com/[/url]
"news.pandora.be" <no@no.com> wrote in message
news:SJ7qc.113124$Ug7.6291513@phobos.telenet-ops.be...> It's in a sort of message board so I cant realy controle what will be
> displayed in the table.
> I have to make shure that if someone has put in such long words my table
> will still be displayed as it should.
> Therefor I'm looking for an ASP-code that places an "<BR>" into my string
> if
> there are words longer than 40 letters in it. It doesn't realy matter to
> me
> where the words are broken as long as they are.
>
> gr.
>
> Wannes
>
> "Aaron Bertrand [MVP]" <aaron@TRASHaspfaq.com> schreef in bericht
> news:O6j8V1DPEHA.1048@tk2msftngp13.phx.gbl...> this>> What kind of word is longer than 40 letters? Where would it make sense
>> to
>> break up such a word? Exactly in half, after 20 characters, after 32
>> characters, 5 characters from the end, ...?
>>
>> --
>> Aaron Bertrand
>> SQL Server MVP
>> [url]http://www.aspfaq.com/[/url]
>>
>>
>>
>>
>>
>> "news.pandora.be" <no@no.com> wrote in message
>> news:ed7qc.113060$f83.6457443@phobos.telenet-ops.be...>> >I want to display a string in a table but when a word in the string is
>> > longer then 40 letters it won't wrap. Does anyone know how I can fix>>>>> > ?
>> >
>> > Thanx
>> >
>> > Wannes
>> >
>> >
>>
>
Aaron Bertrand [MVP] Guest
-
Aaron Bertrand [MVP] #10
Re: word wrap
> tmp = tmp & "<br>" & mid(str, i, 40)
OOPS! Change str to datas(i) here.
Aaron Bertrand [MVP] Guest
-
Evertjan. #11
Re: word wrap
news.pandora.be wrote on 17 mei 2004 in
microsoft.public.inetserver.asp.general:
this simple j(ava)script script breaks all words> It's in a sort of message board so I cant realy controle what will be
> displayed in the table.
> I have to make shure that if someone has put in such long words my
> table will still be displayed as it should.
> Therefor I'm looking for an ASP-code that places an "<BR>" into my
> string if there are words longer than 40 letters in it. It doesn't
> realy matter to me where the words are broken as long as they are.
>
longer than 40 chars long into 40 char parts
ended by a - and a space:
t = t.replace(/(\S{40})/g,"$1- ")
======================
same in vbscript [longer]:
Set regEx = New RegExp
regEx.Pattern = "(\S{40})"
regEx.Global = True
t = regEx.Replace(t, "$1- ")
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Evertjan. Guest
-
Unregistered #12
Re: Word Wrap
This Worked for me....The content of the cell 1 & 5 were company name which may be comes like "Fire Safety International Ltd" and the Column Header is Just "Name"....So in my grid view it Appeared like
Name
---------
Fire Safety
International Ltd
Which i dont want...
All i want is
Name
-------
Fire Safety International Ltd
Below code gave me wat i want!!!....
protected void gdvCPReport_RowCreated(Object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
TableCell tc = new TableCell();
tc = e.Row.Cells[1];
tc.Style.Add(HtmlTextWriterStyle.WhiteSpace, "nowrap");
TableCell tcr = new TableCell();
tcr = e.Row.Cells[5];
tcr.Style.Add(HtmlTextWriterStyle.WhiteSpace, "nowrap");
}Unregistered Guest



Reply With Quote

