473,472 Members | 1,702 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Newline character in datagrid cell

I posted this before but the person who answered it
obviously completely misunderstood what I was talking
about.

I have a datagrid which is bound to a dataset table that
I generate programatically. In one of the fields in the
datasets' table, I am creating a string which has newline
characters like the following.

sb.append(dr.StartTime)
sb.append("-")
sb.append(dr.EndTime)
sb.append(vbnewline)
sb.append(dr.Activity)

newDR.Itinerary = sb.tostring
ds.WeeklyReport.Rows.Add(newDR)

Unfortunately when the datagrid is displayed in I.E. the
newline characters are ignored.

Instead of showing:
7:00 AM - 10:00 AM
My Activity Text

I get:
7:00 AM - 10:00 AM My Activity
Text

or somehting similar.

I have also tried chr(13) instead of vbnewline.

Is there anyway to force a newline in the cell of a
datagrid?

Billy Jacobs

Jul 19 '05 #1
1 3357
Hi Billy,

You should add "<br/>" to add a newline in the datagrid cell, for example:
sb.append("<br/>")

Please feel free to let me know if you have any problems or concerns.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! ¨C www.microsoft.com/security
This posting is provided ˇ°as isˇ± with no warranties and confers no rights.

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Raymond Lewallen | last post by:
I have tried everything to get a newline character into a datatable to no success. I'm trying to add the following to a column in a datatable: sb.append("A") sb.append(ControlChars.NewLine)...
0
by: Emerson | last post by:
The following assumes a System.Windows.Forms.DataGrid with a System.Data.DataTable set as the DataSource. I'm programming in C# Here's my scenario I click in a cell on a DataGrid. I enter some...
4
by: Suzanne | last post by:
Hi all, I'm having problems with datagrids and the currentcellchanged event. My problem is this: I have a datagrid on a form, if the user changes the text in a cell on the datagrid then tries to...
29
by: runningdog | last post by:
Hi, I would like to be able to embed a newline in a text string. Is there any convienent notation to do this TIA Steve
4
by: tg | last post by:
Visual Studio 2003 My problem is that I am dynamically creating a datagrid on pageload. The datagrid is completely dynamic as it is based on the number of columns returned from a recordset. The...
13
by: pmcguire | last post by:
I have a DataGrid control for which I have also created several new extended DataGridColumnStyles. They behave pretty nicely, but I can't figure out how to implement Selected Item formatting for...
1
by: Billy Jacobs | last post by:
I posted this before but the person who answered it obviously completely misunderstood what I was talking about. I have a datagrid which is bound to a dataset table that I generate...
9
by: will | last post by:
I have an XML input that includes things like: <foo>line of text another line of text yet another</foo> And I want the entities PRESERVED (not translated) on the result, so: <bar>line of...
3
by: GoalieDude | last post by:
My problem is that I'll receive a large excel file from a customer that has hard return in one of the cells (i.e. pressing alt + enter to make a new line in a cell) and when I export it to a text...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.