I want to apply a line break to only one cell.

Hi, Syncfusion teams.


I want to express the values in the cell with '</br>' in separate lines.

Is there any way to do this?


It shows the snapshot as below.

br.png


1 Reply

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team February 16, 2022 02:41 PM UTC

Hi TaeWook, 

From your details, we understood that you want add a line break in the datasource to display TreeGrid column. To achieve your requirement we suggest you to define the column property disableHtmlEncode as false to that particular column. 

Refer to the code below:- 
<ejs-treegrid id="TreeGrid" dataSource="@ViewBag.datasource" height="300" childMapping="Children" treeColumnIndex="1"> 
    <e-treegrid-columns> 
        <e-treegrid-column field="TaskName" headerText="<span> Task Name </span>" disableHtmlEncode="false" width="190"></e-treegrid-column> 
        .  .   . 
   </e-treegrid-columns> 
</ejs-treegrid> 

Refer to the documentation link:- 

Screenshot:
 

Regards, 
Farveen sulthana T 


Loader.
Up arrow icon