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

Render html in text from database

2 Answers 301 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 22 Nov 2018, 07:17 PM

Hello,

from a database I get some strings with html included, ie. for links.

In the Dojo I simulate the remote result in the array data. But the html code is not rendered.

I read some help sites about templates, but I found only solutions with constant html text in the template. And not inside remote results.

Regards,

Peter

2 Answers, 1 is accepted

Sort by
0
Accepted
Viktor Tachev
Telerik team
answered on 23 Nov 2018, 11:53 AM
Hello Peter,

I have examined the dojo sample and noticed that the template is using the #: # syntax. With this approach the values will be encoded. If you would like to render the HTML you need to use #= # instead. Check out the updated example below for reference.


If you would like more information on using templates you would find the Templates article in the docs interesting.


Regards,
Viktor Tachev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Peter
Top achievements
Rank 1
answered on 23 Nov 2018, 12:11 PM

Hi Viktor,

thank you. This works also with the text data from the asp.net core controller.

Regards,

Peter

Tags
ListView
Asked by
Peter
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Peter
Top achievements
Rank 1
Share this question
or