Datagrid columns and ntext (via sql server)

P

postings

Hi

I've have some text inside a "ntext" data field from SQL server.

I am displaying this text as a column in a datagrid using ASP.NET 1.1
and VB.NET. The problem is only the last paragraph of the text appears
to be displayed.

For instance

If the ntext field in the database contains:

------>
Blagh, blagh ,blagh, Blagh, blagh ,blagh, Blagh, blagh ,blagh, Blagh,
blagh ,blagh, Blagh, blagh ,blagh, Blagh, blagh ,blagh, Blagh, blagh
,blagh, Blagh, blagh ,blagh, Blagh, blagh ,blagh, Blagh, blagh ,blagh,
Blagh, blagh ,blagh, Blagh, blagh ,blagh,
[New Line]
Whatever,whatever, Whatever,whatever, Whatever,whatever,
Whatever,whatever, Whatever,whatever, Whatever,whatever,
Whatever,whatever, Whatever,whatever, Whatever,whatever,
Whatever,whatever, Whatever,whatever, Whatever,whatever,
[New Line]
Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc,
Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc,
Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc,
Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc,
Etc,
<-------


In the datagrid column on my webpage, only this is displayed.
------>
Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc,
Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc,
Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc,
Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc, Etc,
Etc,
<-----

In reality, if there's 130 characters in the field, only the last
paragraph or so will be displayed. Do you have any idea how I can get
the whole text displayed in the datagrid?

Thing's I'm pondering about
Maybe I need an appropriate data format expression (don't know what
that would be)?
Have I reached a character limit here?
Maybe I can get around this by using ItemTemplate?
Some problem perhaps with carrage return line feeds?

Would you be able to give me some advice?

Many thanks!

Alex
 
P

postings

Just to update this I've put in the following code, it doesn't work and
I'm still stumped!

-------->
For Each myrow As DS.MyRow In DS11.MyTable
myrow.Description = Replace(myrow.Description, "vbcrlf",
"<BR>")
Next
<----------

before binding table to event grid. Doesn't work, but will it replace
other characters if I substitute "vbcrlf" for something else. Note the
text I am processing was originally created with Access/Memo field and
stored as SQL Server/ntext.

Thanks!

Alex
 
P

postings

Stupidly I put quotes around "vbcrlf", remove the quotes and it works.

Many thanks

Alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top