In order to flatten my data and avoid circular references, I created a view model for an object generated by OpenAccess ORM. I noticed something interesting, though. When binding the grid to my new view model (Html.Kendo().Grid<ViewModel>()...), my DateTime fields get converted into JSON dates when the grid is rendered (e.g. /Date(1362974400000)/). However, when I bind the grid to the original model (Html.Kendo().Grid<OpenAccessModel>()...), the dates come out as expected (e.g. Mon Mar 11 2013 00:00:00 GMT-0400 (Eastern Daylight Time)).
I've manipulated the code so that I've isolated the binding as the only difference. There's something different about the two classes that is causing a difference in rendering of the date field (even though that field is a DateTime field for both classes). Any idea why this is happening and if there's a simple way to fix this? Perhaps a bit of metadata attached to the field through OpenAccess that I should include in the view model?
Thanks!
I've manipulated the code so that I've isolated the binding as the only difference. There's something different about the two classes that is causing a difference in rendering of the date field (even though that field is a DateTime field for both classes). Any idea why this is happening and if there's a simple way to fix this? Perhaps a bit of metadata attached to the field through OpenAccess that I should include in the view model?
Thanks!