I have a Telerik Kendo Grid with several bound columns. All columns are working as expected except this DateTime-column tsCreated, which is always null.
The Model:
[DataType(DataType.Date)]
public DateTime tsCreated { get; set; }
The Grid:
@(Html.Kendo().Grid<NNC.ViewModels.OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(c => c.tsCreated);
columns.Bound(c => c.orderNr);
columns.Bound(c => c.customerName);
columns.Bound(c => c.description);
})
.Groupable()
.Filterable()
.Sortable()
.Pageable()
.DataSource(dataSource => dataSource
.Ajax()
.Events(events => events.Error("kendoGrid_ErrorHandler"))
.Model(model => model.Id("orderNr"))
.Read(read => read.Action("EditingInline_Read", "Orders"))
)
)
The JSON data does show the date in tsCreated:
{
"Data":[{"orderNr":"13011155","tsCreated":"\/Date(1423579599377)\/",
"description":"xxxx","customerName":"xxxxx"}],"Total":1,
"AggregateResults":null,"Errors":null
}
I also created a ClientTemplate to display the value, like this:
columns.Bound(c => c.tsCreated).ClientTemplate(
"W= #= tsCreated #"
);
But it displays:
W= null
Any help is appreciated!