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.
Unfortunately, activation email could not send to your email. Please try again.

Best way to wrap text in td

Thread ID:

Created:

Updated:

Platform:

Replies:

129432 Mar 17,2017 05:04 AM Mar 20,2017 01:20 AM JavaScript 1
loading
Tags: ejGrid
Stefano Enrico
Asked On March 17, 2017 05:04 AM

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

Saravanan Arunachalam [Syncfusion]
Replied On March 20, 2017 01:20 AM

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. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;