Solved

Linefeed character in a datagrid

Posted on 2006-07-10
2
288 Views
Last Modified: 2008-02-01
Does anyone know how I can get the linefeed/carriage return character to appear in a datagrid.  When I bind to a string column (in a SQL Server table) that has text that includes the linefeed character the text displayed in the datagrid cell appears as one continues text stream, without the linefeeds.

Thanks
0
Comment
Question by:nicksbell
2 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 250 total points
ID: 17072410
Hi nicksbell,

Replace the linefeed/cr with <br>. The datagrid is displayed as html so you need to use the html breaking line tag.

In your itemdatabound event, or even in the select statement use a replace statement to convert the vbCrLf to <BR>

Tim Cottee
0
 
LVL 2

Author Comment

by:nicksbell
ID: 17073164
yes, that did the trick.  I just included replace(text,char(10),'<BR>') in my select statement.

Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How do I get the id from URL? 19 53
crm development 2 64
SQL Login 17 37
ASP.NET - Bind Gridview Datasource to a specific table in dataset 3 7
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now