Anchor tag in grid template

Hi

 I am trying to use anchor tag in grid column template. here is my code.

column adding.

col.Field("StudentName").Template("#stdname").HeaderText("Name").Width("120").TextAlign(TextAlign.Left).Add();

here is the template

<script type="text/x-jsrender" id="stdname">

                    <a rel="nofollow" rel='nofollow' href="/Students/Studentview/${StudentId}">${StudentId}</a>

                </script>

the rel='nofollow' href of anchor tag is http://localhost:53126/Students/Studentview/34

while the the value of StudentId is 347. its always removing last digit/character in the rel='nofollow' href throughout the application. like if id is 4568 it skip 8 and show only 456 and so on. please help me to resolve this.



2 Replies

YY Yoab Youssoufou July 23, 2021 02:15 AM UTC

I am having this same problem, production grids all messed up, please support any update on this?



PG Praveenkumar Gajendiran Syncfusion Team July 23, 2021 01:08 PM UTC

Hi ejaz, 
  
We deeply regret the inconvenience caused. 

We have already reproduced the reported issue (“data is not bound properly into the rel='nofollow' href attribute”) in our last weekly patch release (v19.2.48). We resolved the issue and refreshed CDN link now. So, kindly use the below script and check from your end. 


[Layout.cshtml] 

<head> 
 
    @* Syncfusion Essential JS 2 Styles *@ 
    <link rel="stylesheet" rel='nofollow' href=https://cdn.syncfusion.com/ej2/material.css /> 
 
    @* Syncfusion Essential JS 2 Scripts *@ 
    <script src=https://cdn.syncfusion.com/ej2/dist/ej2.min.js></script> 
 
</head> 
 

Still, if you have some issue, share the code details you have used in the template. We will help you to resolve it. 

Regards,  
Praveenkumar G 


Loader.
Up arrow icon