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

Inquiry about columns template of EJ2 Grid.

Thread ID:





150289 Dec 31,2019 06:19 AM UTC Jan 2,2020 08:46 AM UTC JavaScript - EJ 2 1
Tags: Grid
jeongkyu park
Asked On December 31, 2019 06:19 AM UTC

Thank you for your kind reply.

I tried to use template for the columns property in EJ2 Grid as I used in EJ1 Grid. I tried to use the same method as the attached file but it doesn't work.

In case of click event, variable and fixed specific value should be put together as parameter, and it was operated in the previous EJ1 Grid.

In Chrome developer tools Elements Tabs the button part under the template inside the Grid looked like this
-------------------- Chrome developer tools Elements Tabs -------------------------------------
<button title="Button" onclick="PopupAlert(" france')'="">France</button>

Can I make an event work when a button is clicked?

Please confirm. Thank you.

Attachment: GridTemplate_5a79b2d5.zip

Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On January 2, 2020 08:46 AM UTC

Hi Jeongkyu, 
Thanks for contacting Syncfusion support, 
We could see you would like to pass the parameters through template button click action. We suggest to use the &quot HTML entity instead of sign of quote(‘’). You are able to pass multiple parameters in button click action which is rendered by the column template. Please refer the below code example and sample for more information. 
<script id="ClickTemplate" type="text/x-jsrender"> 
      <button title="Button" onclick="PopupAlert(&quot;SomeData..&quot;, &quot;${ShipCountry}&quot;)'">${ShipCountry}</button> 

Please get back to us, if you need further assistance. 

Seeni Sakthi Kumar S


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