Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
I am developing c# web application .net frame work 4.5.
 
I used a database for storing feedback from users. for displaying comments i used all of these (datalist, list view, gridview,formview, detail view) but problem is that when the comment is a long string, whole string is printed in single line, which realy destroyes beauty of a page.
 

Name: aaa
Email: @yahoo
Feedback: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
DateAdded: 10/3/2012 12:00:00 AM
 

this whole line is printed in single line.
i want if there is a long string, suppose more than 100 charecters. i want to display 100 char in one line and rest of string in next line.
 
is there any possibilty with either of control, specially i am interested in list view.
is there any possibilty with list view to print a long string in more than one line????
another question is that is there any posibilty with list view to delete any comment?????
 
thanks
Posted 3-Oct-12 9:47am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Look at my article: Word wrap without cutting words[^]
Or any others found by searching on "word wrap"
  Permalink  
Comments
Matt T Heffron at 4-Oct-12 13:38pm
   
The most obvious way is to format the string before putting it into the control.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 645
1 OriginalGriff 335
2 CPallini 250
3 PIEBALDconsult 150
4 Fredrik Bornander 130
0 OriginalGriff 5,835
1 Sergey Alexandrovich Kryukov 5,198
2 CPallini 4,740
3 George Jonsson 3,167
4 Gihan Liyanage 2,470


Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 3 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100