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. Image for the cookie policy date

RowTemplate with a button to post an id


Here is my code that is not working. Please let me know how I could correct the code.

<script id="rowTemplate" type="text/x-template">
        <td class="details">
           @Html.ActionLink("Verify", "VerifyBook", "Verfiy", new {bookId="${Id}"}, new { @class = "btn-primary" })

        public ActionResult VerifyBook(string bookId)

1 Reply

PS Pavithra Subramaniyam Syncfusion Team September 20, 2019 05:41 AM UTC

Hi John, 
Thanks for contacting Syncfusion support. 
For creating routing button with row template we suggest to use the below way. Please refer to the below code example for more information. 
<ejs-grid id="Grid" dataSource="ViewBag.data" height="335" width="auto" rowTemplate="#rowtemplate"> 
        .  .  . 
<script id="rowtemplate"> 
        <td class="details"> 
            <a rel='nofollow' href="/Home/VerifyBook/bookId=${OrderID}" class="btn-primary"> Verify</a> 
Please get back to us if you need any further assistance on this. 
Pavithra S. 

Live Chat Icon For mobile
Up arrow icon