Hi,
When I set DataSource to a grid datetime values are converted to string as /Date(1362607200000)/,
removing DataSource and command column works but I need command values so I should set DataSource for functions.
Works
Sample output
Start Time End Time
230.01.2013 08.02.2013
Doesn't Work
Sample output
Start Time End Time
/Date(1359038400000)/ /Date(1359044400000)/
What should be done to keep datetime values with formatting?
Thanks
When I set DataSource to a grid datetime values are converted to string as /Date(1362607200000)/,
removing DataSource and command column works but I need command values so I should set DataSource for functions.
Works
Html.Kendo().Grid(Model) .Name("grid") .Columns(columns => { columns.Bound(p => p.CaptureRequest.Title).HtmlAttributes(new { style = "cursor:pointer" }).Title(ContentProvider.Resources.Names.Name); columns.Bound(p => p.CaptureRequest.StartDate).Format("{0:dd.MM.yyyy}").Title(ContentProvider.Resources.Names.StartDate); columns.Bound(p => p.CaptureRequest.EndDate).Format("{0:dd.MM.yyyy}").Title(ContentProvider.Resources.Names.EndDate); })Start Time End Time
230.01.2013 08.02.2013
Doesn't Work
Html.Kendo().Grid(Model) .Name("grid") .Columns(columns => { columns.Bound(p => p.CaptureRequest.Title).HtmlAttributes(new { style = "cursor:pointer" }).Title(ContentProvider.Resources.Names.Name); columns.Bound(p => p.CaptureRequest.StartDate).Format("{0:dd.MM.yyyy}").Title(ContentProvider.Resources.Names.StartDate); columns.Bound(p => p.CaptureRequest.EndDate).Format("{0:dd.MM.yyyy}").Title(ContentProvider.Resources.Names.EndDate); columns.Command(command => command.Destroy()).Width(90); }).DataSource(dataSource => dataSource .Ajax() .PageSize(20) .Events(events => { events.Error("onGridError"); events.RequestEnd("onGridRequestEnd"); }) .Model(model => { model.Id(p => p.CaptureRequest.ID); }) .Read(read => read.Action("RequestGridSource/" + @ViewBag.id, "TstvOperation")) .Destroy(update => update.Action("DeleteActiveCaptureRequest", "TstvOperation")) )Start Time End Time
/Date(1359038400000)/ /Date(1359044400000)/
What should be done to keep datetime values with formatting?
Thanks