Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Rajakrishna on Mar 05, 2009 06:15
open dhtmlx forum
:: DHX Grid :: Wrapping the text when no delimiter present.

Hi,

How can I wrap the text present in the cell of the grid when there is not delimiter present in the text.

Example of the text:

1. sdfdsfsdfsdfsdfsdfsdfsdfsdfsdfsdfdsfsdfsdfsdfsdf
2. rajakrishna_working_in_dhtmlx@gmail.com

Answer posted by dhxSupport on Mar 05, 2009 08:00

To wrap text to a new line you can use mygrid.enableMultiline(true)

Unfortunately if your text has some long words without white-spaces - such words will not be breaked in few lines

Answer posted by Rajakrishna on Oct 05, 2009 21:56
Hi,

Can we have some solution towards it ???
As I saw same thing working on excel perfectly....
Is there some kinda of logic or property that we can use ??
Answer posted by Stanislav (support) on Oct 08, 2009 07:28
>>Can we have some solution towards it ???
Behavior is not related to the component , it just one from html rendering rules - text can be broken only on delimiters or spaces.
If you are using readonly cells - it possible to change the value of the cell, by adding invisible breaking chars - it will look as normal but will be able to auto-wrap. Please inform if you need a sample of such customization. 
Answer posted by Aya on Nov 23, 2009 13:26
Adding the following style enables word wrap with no delimiters:  
word-wrap: break-word;

Answer posted by Stanislav (support) on Nov 24, 2009 06:11
Yep, adding the next code can do the trick. ( expect of Opera, which doesn't support break-word rule ) 

div.gridbox .obj td{
   white-space: break-word;
}