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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Column details at column template

Thread ID:





124600 Jun 16,2016 11:23 AM UTC Aug 1,2016 04:29 AM UTC JavaScript 6
Tags: ejGrid
Mohamed Elhamamsy
Asked On June 16, 2016 11:23 AM UTC

I have a grid with unknown number of columns based on data stored in database.

These columns are with the same data type and the same format.

I need to create one columnTemplate for them, So in JsRender template I need some information to indicate what is the column index or the column name in order to render the related data.

I've found that Someone asked for this issue before in the following thread:


and I'd like to know if this issue has been finished and how to use it.

Thanks in advance

Jayaprakash Kamaraj [Syncfusion]
Replied On June 17, 2016 05:08 PM UTC

Hi Mohamed,  
Thank you for contacting Syncfusion support. 
We have fixed the issue in our latest version ( and your requirement is achieved by using js render helper class in column template.  
We have created a sample using jsPlayground,  
$(function () { 
                columns: [//column template 
                         { { field: "EmployeeID", template: "{{:~getModel()}}", headerText: "Employee ID", isPrimarykey: true, editType: ej.Grid.EditingType.NumericEdit, textAlign: ej.TextAlign.Right, width: 90 }, 
                                               { field: "FirstName",template: "{{:~getModel()}}",  headerText: "First Name", width: 90 },                          
        $.views.helpers({//helper class 
            getModel: function () { 
               if (this.ctx.prop.field == "EmployeeID") 
                    return this.ctx.root.EmployeeID; 
                    return this.ctx.root.FirstName; 
Jayaprakash K.

Mohamed Elhamamsy
Replied On July 28, 2016 09:58 AM UTC

Thanks a lot.
But I need also to know if this issue has been applied for treeGrid or not ?

Jayaprakash Kamaraj [Syncfusion]
Replied On July 29, 2016 12:42 PM UTC

Hi Mohamed, 
Query : But I need also to know if this issue has been applied for treeGrid or not ? 
A support incident has been created under your account to resolve the issue. Please log on to our support website to check for further updates.  
Jayaprakash K. 

Mohamed Elhamamsy
Replied On July 31, 2016 03:16 PM UTC

Thank you very much.

Mohamed Elhamamsy
Replied On July 31, 2016 03:25 PM UTC

Thank you very much.

Jayaprakash Kamaraj [Syncfusion]
Replied On August 1, 2016 04:29 AM UTC

Hi Mohamed,  
Thanks for the update. 
Please get back to us if you need any further assistance.   
Jayaprakash K. 


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