• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 316
  • Last Modified:

Linefeed character in a datagrid

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
nicksbell
Asked:
nicksbell
1 Solution
 
TimCotteeCommented:
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
 
nicksbellAuthor Commented:
yes, that did the trick.  I just included replace(text,char(10),'<BR>') in my select statement.

Thanks
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now