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.
Unfortunately, activation email could not send to your email. Please try again.

Format Method is not working

Thread ID:

Created:

Updated:

Platform:

Replies:

124539 Jun 13,2016 08:15 AM Jun 21,2016 05:15 AM ASP.NET MVC 3
loading
Tags: Grid
Carsten Buchmann
Asked On June 13, 2016 08:15 AM

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


Karthick Kuppusamy [Syncfusion]
Replied On June 14, 2016 02:53 AM

 
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 


Carsten Buchmann
Replied On June 20, 2016 11:55 AM

Which files do I need? I need this feature soon for a prototype!

Karthick Kuppusamy [Syncfusion]
Replied On June 21, 2016 05:15 AM

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  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;