We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Best way to wrap text in td

Hi, 

what is the best way to wrap the text in the cell (TD)?
I need to apply a CSS class to content

Thanks
Stefano

1 Reply

SA Saravanan Arunachalam Syncfusion Team March 20, 2017 05:20 AM UTC

Hi Stefano, 
Thanks for contacting Syncfusion’s support. 
We have analyzed your requirement, we have inbuilt support to wrap the cell content by defining the allowTextWrap property of ejGrid as true and we can apply this auto wrap specifically for content/header/both (default) by defining the textWrapSettings->wrapMode property of ejGrid. Please refer to the below online api reference and sample links. 
Note: When enable the allowTextWrap property, the sentence will wrap based on the words and if the cell has single word, it will not wrap. So, we suggest you to use below style in your project, if you want to wrap even a single word.  
<style> 
        .e-grid .e-gridcontent{ 
            word-wrapbreak-word!important; 
        } 
    </style> 
 
  
And also refer the following stackoverflow link. 
Regards, 
Saravanan A. 


Loader.
Live Chat Icon For mobile
Up arrow icon