Maximize productivity with
30% off* for a limited time
using BOOSTDEV30.
Includes 3- and 5-packs.
*Some exclusions may apply.New Product LaunchBoldDesk: Help desk ticketing software starts at $10 for 3 agents.
Try it for free.@(Html.EJS().Grid("Grid").DataSource(ds => ds.Url(@Url.Action("KycDatasource", "Admin")).Adaptor("UrlAdaptor")).AllowSorting().Columns(col =>
{ col.Field("Status").HeaderText("Status").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Center).Template("#statusTemplate").Width("80").Add();
col.HeaderText("Action").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Center).Template("#template").Width("150").Add();
}).Render())
Then my jsrender is:
<script id="template" type="text/x-jsrender">{{if Status == "Pending"}}<a class="badge badge-danger" rel='nofollow' href="/Admin/AcceptKyc/${NumberId}">Accept</a>{{/if}}</script>
Result:
What did I do wrong?
<script id="template" type="text/x-template">
${if(Status == "Pending")}
<a class="badge badge-danger" rel='nofollow' href="/Admin/AcceptKyc/${NumberId}">Accept</a>
${/if}
</script>
|