BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
@(Html.EJ().Grid<object>("Grid")
.Datasource(ds => ds.Json((IEnumerable<object>)ViewBag.dataSource))
.Columns(cols =>
{
cols.Field("Id").HeaderText("ID").IsPrimaryKey(true).Add();
cols.Field("Name").HeaderText("Person Name").Add();
cols.Field("Designation").HeaderText("Designation").Add();
cols.Field("LoginTime").HeaderText("Login Date").Format("{0:MM/dd/yyyy hh:mm:ss}").Add();
cols.Field("Verified").HeaderText("Verified").Template("#ColumnTemp").Add();
})
) |
<script type="text/x-jsrender" id="ColumnTemp">
<img style="width: 75px; height: 70px" src="../Employees/{{:Verified}}.png" alt="{{: Verified }}" />
</script> |
<script id="columnTemplate" type="text/x-jsrender">
{{if Verified}}
<img src="../Employees/trueicon.png" alt="{{:Verified}}" />
{{else }}
<img src="../Employees/falseicon.png" alt="{{:Verified}}" />
{{/if}}
</script> |