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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Break the header text into two lines

Thread ID:

Created:

Updated:

Platform:

Replies:

150684 Jan 16,2020 05:04 AM UTC Jan 20,2020 05:46 AM UTC Angular - EJ 2 3
loading
Tags: Grid
Neo
Asked On January 16, 2020 05:04 AM UTC

Hi all,

How can we break the header text into two lines. Previously I used <br> tag. But currently not working on that after packages update. Any solution for this?

column.headerText = fieldDisplayName + "<br>" + uom;


Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On January 17, 2020 09:19 AM UTC

Hi Shamil,  

Greetings from Syncfusion.  

From the v17.3.26, we have set the Grid’s column.disableHtmlEncode to true (as default), which will show the br or any HTML as string in the headerText of the Grid columns. Refer to the following release notes.  


If you would like to use the br with the HTML encode, set the disableHtmlEncode property as false. Refer to the documentation for the disableHtmlEncode.  


You can use the allowTextWrap and textWrapsettings.mode to set the wrapping only for the Grid’s header. Refer to the following Help Document.  


Regards,  
Seeni Sakthi Kumar S 


Neo
Replied On January 17, 2020 09:21 AM UTC

Hi Shamil,  

Greetings from Syncfusion.  

From the v17.3.26, we have set the Grid’s column.disableHtmlEncode to true (as default), which will show the br or any HTML as string in the headerText of the Grid columns. Refer to the following release notes.  


If you would like to use the br with the HTML encode, set the disableHtmlEncode property as false. Refer to the documentation for the disableHtmlEncode.  


You can use the allowTextWrap and textWrapsettings.mode to set the wrapping only for the Grid’s header. Refer to the following Help Document.  


Regards,  
Seeni Sakthi Kumar S 


That's worked. Thank you very much.

Dhivya Rajendran [Syncfusion]
Replied On January 20, 2020 05:46 AM UTC

Hi Shamil, 

We are happy to hear that the provided solution was helpful to achieve your requirement. Please get back to us if you need further assistance on this. 

Regards, 
R.Dhivya 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon