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

Template not e

Thread ID:

Created:

Updated:

Platform:

Replies:

144062 Apr 16,2019 01:03 PM UTC Apr 18,2019 06:56 AM UTC ASP.NET MVC - EJ 2 3
loading
Tags: Grid
Dave Nixon
Asked On April 16, 2019 01:03 PM UTC

When I have a template as a column it does seem to update the {{: items

@Html.EJS().Grid("FieldList").AllowSorting(true).AllowPaging(true).DataSource(dataManger =>
{ dataManger.Url("/TimeAndExpense/Field/UrlDatasource").Adaptor("UrlAdaptor"); }).Columns(col =>
{
    col.Field("Id").HeaderText("Id").IsPrimaryKey(true).Width("40").ValidationRules(new { required = true }).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Visible(true).Add();
    col.Field("Week").HeaderText("Week").Width("40").ValidationRules(new { required = true }).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Visible(true).Format("yMd").Add();
    col.Field("JobDescription").HeaderText("Job").Width("40").ValidationRules(new { required = true }).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Visible(true).Add();
    col.HeaderText("Manage Records").Template("<a rel='nofollow' rel='nofollow' href='Edit/?Id={{:Id}}'>/Edit/{{:Id}}</a>").Add();
}).Load("loadFieldList").RowSelected("onRowSelected").Render()

Results in the following


Pavithra Subramaniyam [Syncfusion]
Replied On April 17, 2019 05:56 AM UTC

Hi Dave, 

Thanks for contacting Syncfusion support. 

In Essential JavaScript 2, we suggest you to use template literals (“${}”) for templates. Please refer to the code example, documentation link  for more information. 

[index.cshtml] 
col.HeaderText("Manage Records").Template("<a rel='nofollow' rel='nofollow' href='Edit/?Id=${OrderID}'>/Edit/${OrderID}</a>").Add(); 


Please contact us if you need any further assistance on this. 
 
Regards, 
Pavithra S. 
 


Dave Nixon
Replied On April 17, 2019 01:25 PM UTC

Thanks I must of been looking at the wrong samples.

Pavithra Subramaniyam [Syncfusion]
Replied On April 18, 2019 06:56 AM UTC

Hi Dave, 
 
Thanks for your update. 
 
Please get back to us if you need further assistance. 
 
Regards, 
Pavithra S. 
 


CONFIRMATION

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