By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 838 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

Newline character in datagrid cell

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.