This is a migrated thread and some comments may be shown as answers.

Template shows symbol - ( ' ) apostrophe symbol as &#39 in cell of the column grid

2 Answers 248 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
sunny
Top achievements
Rank 1
sunny asked on 23 Oct 2017, 03:17 PM

The grid cell is showing name's as names &#39s in the vies in the cell. Looking for this issue to fix.

<template kendoGridCellTemplate let-dataItem let-rowIndex="rowIndex" >
<span *ngIf="column !== 'Percentage'">
<span style="color:#3b73af;cursor:pointer">
<span [class.twoDimGrid]="column === header">
<span (click)="rowItemClick(dataItem, column)">
{{dataItem[column]}}
</span>
</span>
</span>
</span>

where to add code to fix this issue.

 

2 Answers, 1 is accepted

Sort by
0
sunny
Top achievements
Rank 1
answered on 23 Oct 2017, 04:41 PM
I want to show the ' in the grid to the users instead of &#39. but not getting how to manipulate the template binding data. can i write a function to manipulate each data item during display?
0
Dimiter Topalov
Telerik team
answered on 25 Oct 2017, 02:12 PM
Hi Sunny,

I could not reproduce the described issue on my end:

http://plnkr.co/edit/FPZJyu6G6u0RhojE8bMI?p=preview

In general, all templates in Angular are sanitized by default for security reasons, so you can also bind the element that is used in the template's innerHTML property instead, e.g.:

http://plnkr.co/edit/brEr5pZvntrnNezvHWes?p=preview

I hope this helps, but if the issue persists, please send us a similar isolated runnable project where the undesired rendering can be observed, so we can inspect it further and suggest a solution that is more suitable for the specific scenario. Thank you in advance.

Regards,
Dimiter Topalov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
sunny
Top achievements
Rank 1
Answers by
sunny
Top achievements
Rank 1
Dimiter Topalov
Telerik team
Share this question
or