Hi,
I tried to format a DateTime String but it doesn't work. Also the Excelfilter doesn't recognize the type.
Here's my code:
<script src="/Scripts/modernizr-2.6.2.js"></script>
<link rel='nofollow' href="/Content/ej/web/bootstrap-theme/ej.web.all.min.css" rel="stylesheet"/>
<script src="/Scripts/jquery-1.10.2.js"></script>
<script src="/Scripts/jquery-ui-1.11.4.js"></script>
<script src="/Scripts/cldr.js"></script>
<script src="/Scripts/cldr/event.js"></script>
<script src="/Scripts/cldr/supplemental.js"></script>
<script src="/Scripts/globalize.js"></script>
<script src="/Scripts/globalize/date.js"></script>
<script src="/Scripts/globalize/number.js"></script>
<script src="/Scripts/bootstrap.js"></script>
<script src="/Scripts/respond.js"></script>
<script src="/Scripts/jquery.easing.1.3.js"></script>
<script src="/Scripts/jsrender.min.js"></script>
<script src="/Scripts/ej/web/ej.web.all.min.js"></script>
<script src="/Scripts/ej/localetexts/ej.localetexts.de-DE.js"></script>
@(Html.EJ().Grid<SYM.FacilityCleaning.Web.Models.ViewModels.IndexAppointmentViewModel>("Grid")
.Datasource(Model)
.AllowFiltering()
.FilterSettings(f => f.FilterType(Syncfusion.JavaScript.FilterType.Excel))
.AllowPaging()
.IsResponsive(true)
.Locale("de-DE")
.Columns(col =>
{
col.HeaderText("")
.Template("<span class='btn btn-default'><a role='button' rel='nofollow' href='/Appointment/Edit/{{:Id}}' class='fa fa-pencil'></a></span> <span class='btn btn-default'><a rel='nofollow' href='/Appointment/Details/{{:Id}}' class='fa fa-search'></a></span> <span class='btn btn-default'><a rel='nofollow' href='/Appointment/Delete/{{:Id}}' class='fa fa-trash'></a></span>")
.Width(140)
.AllowResizing(false)
.AllowFiltering(false)
.Add();
col.Field(l => l.LocationName).Add();
col.Field(l => l.LocationStreet).Add();
col.Field(l => l.LocationZipcode).Width(80).Add();
col.Field(l => l.LocationCity).Add();
col.Field(l => l.StartTime).Format("{0:dd.MM.yyyy}").Add();
col.Field(l => l.StartTime).Format("{0:HH:mm}").Add();
col.Field(l => l.EndTime).Format("{0:dd.MM.yyyy}").Add();
col.Field(l => l.EndTime).Format("{0:HH:mm}").Add();
col.HeaderText("")
.Template("<span class='btn btn-default'><a role='button' rel='nofollow' href='/Location/ListUser/{{:Id}}' class='fa fa-users'></a> <small class='badge'>{{:OperationCount}}</span></small>")
.Width(90)
.AllowResizing(false)
.Add();
})
)
And here's a screenshot:
Regards,
Carsten