Current location: Hot Scripts Forums » Programming Languages » ASP.NET » Datagrid and carriage return?

Datagrid and carriage return?

Reply
  #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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 02-22-05, 07:50 AM
zissorbobo zissorbobo is offline
New Member
 
Join Date: Feb 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Solution: use html tags...

Solved by using HTML Tags like <BR> in the database instead of carriage return....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 05:35 PM.
vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.