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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid does not show UK currency or date

Thread ID:





118871 Apr 17,2015 09:33 AM UTC Apr 20,2015 06:10 AM UTC ASP.NET MVC 1
Tags: Grid
peter hancock
Asked On April 17, 2015 09:33 AM UTC

I have just logged this and nothing is appearing under my threads!!! The board meet on Tuesday to decide if we are going ahead with this product and we have a show stopper.

I am using EJGrid and the dates and currencies are not displaying in correctly and in UK format:

Currency: $10.00
Date: /date(123123123123)/

Innumerable MVC object returned in json:

 public class ApplicationForPaymentModel
        public Guid Id { get; set; }
        [Display(Name = "Application Ref")]
        public String ApplicationReference{ get; set; }
        [Display(Name = "Application Date")]
        public System.DateTime? ApplicationDate{ get; set; }
        [Display(Name = "Valuation Period End")]
        public DateTime? ValuationPeriodEndDate { get; set; }
        [Display(Name = "Amount")]
        public Decimal Amount{ get; set; }
        [Display(Name = "Application Contract To")]
        public DateTime? ApplicationContractToDate { get; set; }
        [Display(Name = "Payment Due Date")]
        public DateTime? PaymentDueDate { get; set; }
        [Display(Name = "Payment Notice Date")]
        public DateTime? PaymentNoticeDate { get; set; }
        [Display(Name = "Pay Less Notice Date")]
        public DateTime? PayLessNoticeDate { get; set; }
        [Display(Name = "Final Date For Payment")]
        public DateTime? FinalDateForPayment { get; set; }
        public Boolean Accepted { get; set; }

grid as follows:

$.post("@Url.Action("ArchivedApplications", "ApplicationsForPayment")",
            function (data) {
                    dataSource: data, // data must be array of json
                    columns: [
                       { field: "ApplicationReference", headerText: "Reference", width: 100 },
                       { field: "ApplicationDate", headerText: "Application Date", width: 80, format: "{0:dd/MM/yyyy}" },
                       { field: "Amount", headerText: "Amount", width: 100, textAlign: ej.TextAlign.Right, format: "{0:C2}" }
                    pageSettings: { pageSize: 3 },
                    allowSorting: true,
                    allowPaging: true,
                    allowFiltering: true,
                    filterSettings: { filterType: "excel" },
                    enableAltRow: true,
                    //enablePersistence: true,

layout as follows:

    <script src="@Url.Content("~/Scripts/jquery-1.10.2.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jsrender.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.easing-1.3.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.globalize.min.js")"></script>
    <script src="@Url.Content("~/Scripts/globalize.culture.en-GB.min.js")"></script>
    <script src="@Url.Content("~/Scripts/ej/ej.web.all.min.js")"></script>
    <script src="@Url.Content("~/Scripts/ej/ej.unobtrusive.min.js")"></script>

Ragavee U S [Syncfusion]
Replied On April 20, 2015 06:10 AM UTC

Hi Peter,

Thanks for your interest in syncfusion products.

Query #1: the dates and currencies are not displaying in correctly

For your kind information, we have already discussed the same issue in the below Knowledge base link. So please refer the below link to resolve the issue.

Online Knowledge Base Link: http://www.syncfusion.com/kb/3017/date-fields-in-json-data-are-not-formatted-properly-in-ajax-post

Query #2: the dates and currencies are not in UK format:

For your kind information, in order to set the localization for the grid, the locale property of the grid can be used. Please refer the below Online Knowledge base link for more information on how to enable localization in Grid.

Online Knowledge base Link: http://www.syncfusion.com/kb/4008/how-to-enable-localization-in-grid

The culture script file corresponding to the localization can be found in the below location.

Culture Script Location: C:\Program Files (x86)\Syncfusion\Essential Studio\\JavaScript\assets\external\cultures

For your convenience, we have created a simple sample with the above solutions and the sample can be downloaded from the below location.

Sample Link: http://www.syncfusion.com/downloads/support/forum/118871/Sample-689940584.zip
Please get back to us if you need any further assistance.

Ragavee U S


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon