Solved

Linefeed character in a datagrid

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

707 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

13 Experts available now in Live!

Get 1:1 Help Now