![]()
<e-treegrid-columnfield="MA_TMP" headerText="M.A TMP.(TM,℃)" visible="true" width="110" headerTextAlign="Center" defaultValue="@empty"></e-treegrid-column>
I want to subscript some of the names in the columns shown in the image.
The name of the sub-column was applied like the following code, but the name of the top column is not easy to apply.
Is there a service that changes to "subscript"?
new Syncfusion.EJ2.Grids.GridColumn { Field ="PC_AES" , Width ="100", HeaderText ="A<sub>es</sub> (m²)" , AllowEditing = false, HeaderTextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, TextAlign = Syncfusion.EJ2.Grids.TextAlign.Right , DisableHtmlEncode = false},
Hi TaeWook Kang,
Thanks for contacting syncfusion forum.
Query: Is there a service that changes to "subscript"?
We achieved your requirement by using the “sub” tag and disableHtmlEncode property of the treegrid.
Please refer to the below code example,
|
<ejs-treegrid id="CalGrid" …> …. <e-treegrid-columns> <e-treegrid-column disableHtmlEncode="false" headerText="A<sub>es</sub>(m²)" textAlign="Center" columns="@( new List<Syncfusion.EJ2.TreeGrid.TreeGridColumn>() { new Syncfusion.EJ2.TreeGrid.TreeGridColumn { Field = "ID", Width = "110", HeaderText="A<sub>es</sub> (m²)", DisableHtmlEncode=false, TextAlign= Syncfusion.EJ2.Grids.TextAlign.Right }, new Syncfusion.EJ2.TreeGrid.TreeGridColumn { Field = "Name", Width = "220", HeaderText = "Order Name", TextAlign= Syncfusion.EJ2.Grids.TextAlign.Left }, new Syncfusion.EJ2.TreeGrid.TreeGridColumn { Field = "OrderDate", Width = "120", HeaderText = "Order Date", TextAlign= Syncfusion.EJ2.Grids.TextAlign.Right, Format="yMd" }} )"> </e-treegrid-column>
|
Please refer to the below screenshot,
Please refer to the below API documentation,
https://ej2.syncfusion.com/documentation/api/treegrid/column/#disablehtmlencode
Kindly get back to us for further assistance.
Regards,
Pon selva
If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.
Thank you for your good reply.
Thanks to you, I solved it.
Regards.