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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Column Template not working in EJ2 Grid

Thread ID:





142298 Jan 25,2019 06:43 PM UTC Feb 7,2019 04:46 AM UTC ASP.NET MVC - EJ 2 3
Tags: Grid
Fabrizio Alessandro
Asked On January 25, 2019 06:43 PM UTC

I am moving to Essential JS 2, but I have an issue with Column Template in Grid control,
in the cell of a templated column I can only see the template id, as in the image:
(Last column has template)

Here is the code for the Grid:

.Columns(col =>
                    string width = (100).ToString("P");
                    col.Field("NUMERO_AFFIDAMENTO").HeaderText("N. Affidamento").TextAlign(TextAlign.Left).Width(width).Add();
                    col.Field("NUMERO_PRATICHE").HeaderText("N. Pratiche").TextAlign(TextAlign.Right).Width(width).Add();

The template code:
<script id="template" type="text/x-template">

Thank You,

Madhu Sudhanan P [Syncfusion]
Replied On January 28, 2019 04:29 AM UTC

Hi Fabrizio, 

Thanks for contacting Syncfusion support. 

Essential JS 2 for ASP.NET MVC uses ES6 template format placeholder with our own template engine. Your code should be changed as below to work properly. 

<script id="template" type="text/x-template"> 

Madhu Sudhanan P 

Fabrizio Alessandro
Replied On February 6, 2019 11:28 PM UTC

Thank you now it is correct!

Madhu Sudhanan P [Syncfusion]
Replied On February 7, 2019 04:46 AM UTC

Hi Fabrizio, 
Thanks for the update. Please get back to us if you need further assistance. 
Madhu Sudhanan P 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon