This is a migrated thread and some comments may be shown as answers.

How to wrap the text in cell

3 Answers 259 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dhana R
Top achievements
Rank 1
Dhana R asked on 08 Sep 2009, 06:25 AM
Hi,

 Am using radgrid.I need to show more than 5 fields in the UI.so I want to warp the text of some fields like email,name etc

i have tried by using
HeaderStyle-Wrap="true" DataFormatString="<br>{0}</br>" HeaderStyle-Width ="40px"  itemStyle-Width="80px"  ItemStyle-Wrap="true"

and also used

 <table  style="table-layout:fixed; overflow:hidden">

But the contents are not wrapped. Anyone can help me to solve this isue

Thanks for your help

Dhana

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 08 Sep 2009, 06:58 AM
Hi Dhana,

The Wrap property is true by default. But for the wrap to take place properly make sure that the cell text contains white space in between. Also set the TableLayout to Fixed.

 
     <MasterTableView TableLayout="Fixed" > 

But in the case of email field there won't be any space in an email address. In that case one possible option would be to set a tooltip, which would show the complete contentes of the cell, when the user hovers over it.

Hope this suggestion helps...
Princy
0
Pooya
Top achievements
Rank 1
answered on 09 May 2011, 03:44 PM
Setting TableLayout to Fixed would work only in IE, not in FireFox.

Any solution?
0
Pooya
Top achievements
Rank 1
answered on 10 May 2011, 09:59 AM
For the benefit of others, I added this css attribute to my MasterTable class:

/* this is for FireFox's benefit only, IE does it automatically! */
word-wrapbreak-word;


Tags
Grid
Asked by
Dhana R
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Pooya
Top achievements
Rank 1
Share this question
or