- Home
- Forum
- ASP.NET MVC
- Format Method is not working
Format Method is not working
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
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
SIGN IN To post a reply.
3 Replies
KK
Karthick Kuppusamy
Syncfusion Team
June 14, 2016 06:53 AM UTC
Hi Carsten,
We considered this “Latest generated files not refreshed in Nuget package” as an issue and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
Regards,
Karthick.K
CB
Carsten Buchmann
June 20, 2016 03:55 PM UTC
Which files do I need? I need this feature soon for a prototype!
KK
Karthick Kuppusamy
Syncfusion Team
June 21, 2016 09:15 AM UTC
Hi Carsten,
The fix for the reported issue “Latest generated files not refreshed in Nuget package “will be included in our Vol 2 release which is scheduled to be released by the end of this week.
Regards,
K Karthick
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
CB Carsten Buchmann
- Jun 13, 2016 12:15 PM UTC
- Jun 21, 2016 09:15 AM UTC