View Single Post
  #1 (permalink)  
Old 02-22-05, 05:20 AM
zissorbobo zissorbobo is offline
New Member
 
Join Date: Feb 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Datagrid and carriage return? C# - Need help

Hello friends!
I'm having a problem with a datagrid bound to a dataset in ASP.Net with C#

In the database I have entered some text like with an carriage return. But the datagrid trims away the carriage returns...

I would like the datagrid to show these three records like this:

Column1......... Column2............ Column3
-------------------------------------------------
...1..................Test1.1........... This is test one
-------------------------------------------------
...2............... Test2.1............. This is test two
....................Test2.2....................... ................
....................Test2.3....................... ................
-------------------------------------------------
...3 ............. Test 3.1.......................................
-------------------------------------------------
Does anywon know the solution for this?

I have tried to put into the database *n* as a seperator, and in the Datagrid1.ItemDataBound I'v replacing the *n* with \n or \r\n, but whats happens is that for item 2 its like this: Test2.1Test2.2Test2.3 but I want this to be on seperate lines but in the same row of course.

(I'v tried to turn on the .Wrap = true for items also... )

Please let me know if anyone have a solution for this.

Thanks

Last edited by zissorbobo; 02-22-05 at 05:52 AM. Reason: Need help
Reply With Quote