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

Break the header text into two lines

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;


3 Replies

SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team 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 



NE Neo replied to Seeni Sakthi Kumar Seeni Raj 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.


DR Dhivya Rajendran Syncfusion Team 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 


Loader.
Live Chat Icon For mobile
Up arrow icon