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
close icon

How to pass ID to Html.ActionLink in Grid in ej2

In the last column I am passing ID and I am using template to render an actionlink.
How can I pass ID in the action link?

  <ejs-grid id="Grid" dataSource="@Model.Orders" allowPaging="true" toolbar="@( new List<object>() {"Add","Edit","Delete","Update","Cancel"})">
            <e-grid-pagesettings pageSize="2" />
            <e-grid-columns>
                <e-grid-column field="Name" headerText="Order ID" textAlign="Right" width="120"></e-grid-column>
                <e-grid-column field="Email" headerText="Customer Name" width="150"></e-grid-column>
                <e-grid-column field="PhoneNumber" headerText=" Order Date" format="yMd" width="130"></e-grid-column>
                <e-grid-column field="CheckIn" headerText="Freight" format="C2" width="120"></e-grid-column>
                <e-grid-column field="Room.Name" headerText="Shipped Date" format="yMd" width="140"></e-grid-column>
                <e-grid-column field="OrderTotal" headerText="Ship Country" width="150"></e-grid-column>
                <e-grid-column field="Id" headerText="Ship City" template="#temp" width="170"></e-grid-column>
            </e-grid-columns>
        </ejs-grid>

<script id="temp" type="text/x-template">
            @Html.ActionLink("Home", "Index", new { id= })
        </script>

I need to pass the id in the action link.

2 Replies

AG Ajith Govarthan Syncfusion Team April 14, 2020 02:42 AM UTC

Hi Bhrugen, 

Greetings from Syncfusion. 

Currently we are working with your requirement and we will update you on 15th April 2020. 

Regards, 
Ajith G. 



TS Thiyagu Subramani Syncfusion Team April 15, 2020 01:56 PM UTC

Hi Bhrugen, 

Thanks for your patience. 

Based on your reported information we have validated your requirement at our end.  For this query we have already discussed  detailed in this  bellow link. Please refer it. 


Please get back to us, if you need any further assistance. 

Regards, 
Thiyagu S. 


Loader.
Up arrow icon