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

RenderAction within DetailsTemplate

Is it possible to use Html.RenderAction or Html.RenderPartial within a DetailsTemplate such as:

<script id="tabGridContents" type="text/x-jsrender">
    @{Html.RenderAction("GetEmployeeDetails", new { id = "{{:EmployeeId}}" });}

@(Html.EJ().Grid<EmployeeView>("DetailTemplate") .Datasource((IEnumerable<object>)ViewBag.datasource) .Columns(col =>
col.Field("EmployeeID").HeaderText("Employee ID").IsPrimaryKey(true).TextAlign(TextAlign.Right).Width(75).Add();
col.Field("FirstName").HeaderText("First Name").Width(100).Add();

1 Reply

SR Sellappandi Ramu Syncfusion Team April 2, 2015 01:54 PM UTC

Hi Lan Hicks,

Thanks for using Syncfusion products.

Based on your requirement we have created a sample by using Html.RenderPartial. The sample can be downloaded from following location.

Sample Link: http://www.syncfusion.com/downloads/support/forum/118706/DetailsTemplate1914582495.zip

Please refer the following code snippet.





.AllowPaging() /*Paging Enabled*/

.Columns(col =>




.ClientSideEvents(eve => { eve.DetailsDataBound("detailGridData"); })


<script src="~/Scripts/jsondata.js"></script>

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




<div id="gridTab{{:OrderID}}">

<div id="detailGrid">



Please try the above sample and let us know if it helps. If we misunderstood your requirements, please provide us clear information. The information provided would be more helpful for us to analyze the issue and provide you the response as early as possible.


Sellappandi R

Live Chat Icon For mobile
Up arrow icon