<ejs-grid id="Grid" allowGrouping="true" allowPaging="true">
<e-data-manager json="@Model.Events"></e-data-manager>
<e-grid-groupsettings showDropArea="false" columns="@(new string[] { "EventDate"})"></e-grid-groupsettings>
<e-grid-pagesettings pageCount=5></e-grid-pagesettings>
<e-grid-columns>
<e-grid-column field="EventDate" headerText="Date" width="140" format="E MMM d yyyy" enableGroupByFormat="true"></e-grid-column>
<e-grid-column field="EventData" template="#templateeventdata" width="120"></e-grid-column>
</e-grid-columns>
</ejs-grid>
<script id="templateeventdata" type="text/x-template">
<partial name="${EventView}" model="e" /> ( I know this does not work as is, but is there any way that I could make that work?)
</script>
[index.cshtml]
<ejs-grid id="Grid" dataSource="@ViewBag.DataSource" allowPaging="true">
<e-grid-columns>
<e-grid-column field="OrderID" headerText="Order ID" isPrimaryKey="true" textAlign="Right" validationRules="@(new { required = true })" width="100"></e-grid-column>
<e-grid-column field="CustomerID" headerText="Customer ID" type="string" width="120"></e-grid-column>
<e-grid-column field="EmployeeID" headerText="Employee ID" template="#template" width="120"></e-grid-column>
<e-grid-column field="Freight" headerText="Freight" textAlign="Right" format="C2" editType="numericedit" width="120"></e-grid-column>
<e-grid-column field="ShipCity" headerText="Ship City" width="150"></e-grid-column>
<e-grid-column field="ShipCountry" headerText="Ship Country" width="150"></e-grid-column>
</e-grid-columns>
</ejs-grid>
<script id="template" type="text/template">
<div class="image">
@Html.Partial("_DialogAddPartial")
</div>
</script>
[_DialogAddPartial.cshtml]
@model EJ2Grid.Controllers.HomeController.Orders
@*//define the model for store the model values*@
<img src="@Url.Content("https://ej2.syncfusion.com/javascript/demos/src/grid/images/${EmployeeID}.png")" alt="${EmployeeID}" />
|