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")]
[DataType(DataType.Date)]
[Required]
public System.DateTime? ApplicationDate{ get; set; }
[Display(Name = "Valuation Period End")]
[DataType(DataType.Date)]
[Required]
public DateTime? ValuationPeriodEndDate { get; set; }
[Display(Name = "Amount")]
[DataType(DataType.Currency)]
[Required]
public Decimal Amount{ get; set; }
[Display(Name = "Application Contract To")]
[DataType(DataType.Date)]
[Required]
public DateTime? ApplicationContractToDate { get; set; }
[Required]
[DataType(DataType.Date)]
[Display(Name = "Payment Due Date")]
public DateTime? PaymentDueDate { get; set; }
[Required]
[DataType(DataType.Date)]
[Display(Name = "Payment Notice Date")]
public DateTime? PaymentNoticeDate { get; set; }
[Required]
[DataType(DataType.Date)]
[Display(Name = "Pay Less Notice Date")]
public DateTime? PayLessNoticeDate { get; set; }
[Display(Name = "Final Date For Payment")]
[Required]
[DataType(DataType.Date)]
public DateTime? FinalDateForPayment { get; set; }
public Boolean Accepted { get; set; }
}
grid as follows:
$.post("@Url.Action("ArchivedApplications", "ApplicationsForPayment")",
null,
function (data) {
$("#FlatGrid").ejGrid({
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>