Grid custom template not rendering asp net core

Hello 


   I'm trying to use a custom template for a grid column which contains fields values and not working 

  Could you please assist ? 


Is Working 

  <a onclick="UpsertDosDados(${Carro.Id})" class="btn btn-danger mr-2 mb-2" title="Carro na casa do condutor - alterar dados"><i class="fas fa-house-user"></i></a>

Not Working now ... (This code was working for some time in version 19.1.0.54) I'm using your cdn files in _Layout.cshtml  https://cdn.syncfusion.com/ej2/bootstrap4.css and https://cdn.syncfusion.com/ej2/dist/ej2.min.js 

 <a rel="nofollow" rel='nofollow' href="Parqueamento/Upsert?idParq=0&idCarro=${Carro.Id}" class="btn btn-danger mr-2 mb-2" title="Carro na casa do condutor - alterar dados"><i class="fas fa-house-user"></i></a>


Please view the files in attachment . 



Attachment: Console_Debug_ca5a1267.zip

3 Replies

RR Rajapandi Ravi Syncfusion Team July 26, 2021 12:14 PM UTC

Hi pedro, 

Greetings from syncfusion support 

From your update, we could see that you are using the custom template and facing the problem. We suspect that you are facing a problem with wrong rel='nofollow' href URL. Based on your query we have prepared a sample and try to reproduce your reported problem. But it was unsuccessful. The rel='nofollow' href URL was working fine with the Grid column field value. Please refer the below code example and sample for more information. 


<ejs-grid id="Grid" dataSource="ViewBag.dataSource" allowPaging="true" > 
        <e-grid-pagesettings pageCount="5"></e-grid-pagesettings> 
        <e-grid-columns> 
            <e-grid-column field="OrderID" headerText="Order ID" validationRules="@(new { required=true})" isPrimaryKey="true" textAlign="Right" width="100"></e-grid-column> 
            <e-grid-column field="CustomerID" headerText="Customer Name" validationRules="@(new { required=true})" width="140"></e-grid-column> 
            <e-grid-column field="OrderDate" headerText="Order Date" editType="datepickeredit" format="yMd" width="120"></e-grid-column> 
            <e-grid-column field="ShipCountry" template="#templateAccoes" headerText="Ship Country" editType="dropdownedit" width="140"></e-grid-column> 
        </e-grid-columns> 
    </ejs-grid> 
 
<script id="templateAccoes" type="text/x-template"> 
    <a target="_blank" rel='nofollow' rel='nofollow' href=https://en.wikipedia.org/wiki/${ShipCountry}>${ShipCountry}</a> 
</script> 



Screenshot:  

 

If you still face the issue, please share any issue reproducible sample or please modify the above sample as per your application structure and try to reproduce the issue and share the issue reproducing sample. 

Regards,
Rajapandi R 



PA pedro alegria July 26, 2021 12:50 PM UTC

Hello 

 I've seen the solution in forum 167442

Subject: ejs-grid url passed by the template, logic changed ?


Now is working.., 

Thank you for your support.




RR Rajapandi Ravi Syncfusion Team July 27, 2021 03:38 AM UTC

Hi pedro, 

Thanks for the update. 

We are happy to hear that your issue has been resolved. 

Please get back to us if you need further assistance. 

Regards, 
Rajapandi R 


Loader.
Up arrow icon