Solved

Linefeed character in a datagrid

Posted on 2006-07-10
2
294 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
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 …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

837 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