Hi,
I have a grid in my project and it's giving me problems. In local enviroment when I try to update inline everything works perfect
{
"Data"
:[{
"Id"
:51,
"IdEvento"
:50,
"Nombre"
:
"asdfa"
,
"Descripcion"
:
"sadfasd"
,
"Escuela"
:
"dsdaf"
,
"HoraInicio"
:
"\/Date(1432243240000)\/"
,
"HoraTermino"
:
"\/Date(1432288800000)\/"
,
"Lugar"
:
"dasf"
,
"Estatus"
:
true
,
"Cupo"
:6,
"Inscritos"
:1}],
"Total"
:1,
"AggregateResults"
:
null
,
"Errors"
:
null
}
As you can see the date is correctly set, but when deployd to a Q/A enviroment
{
"Data"
:[{
"Id"
:21,
"IdEvento"
:32,
"Nombre"
:
"taller 1"
,
"Descripcion"
:
"prueba"
,
"Escuela"
:
"Escuela uno"
,
"HoraInicio"
:
"\/Date(-62135575200000)\/"
,
"HoraTermino"
:
"\/Date(-62135575200000)\/"
,
"Lugar"
:
"Lugar uno"
,
"Estatus"
:
true
,
"Cupo"
:48,
"Inscritos"
:22}],
"Total"
:1,
"AggregateResults"
:
null
,
"Errors"
:{
"HoraInicio"
:{
"errors"
:[
"The value \u002701/01/1900 12:30:00 p. m.\u0027 is not valid for HoraInicio."
]},
"HoraTermino"
:{
"errors"
:[
"The value \u002701/01/1900 02:00:00 p. m.\u0027 is not valid for HoraTermino."
]}}}
The same escenario now sets the date wrong.
This is the code from my grid:
01.
@(Html.Kendo().Grid(Model).Name(
"Grid"
).Columns(
02.
columns =>
03.
{
04.
columns.Bound(p => p.IdEvento);
05.
columns.Bound(p => p.Nombre);
06.
columns.Bound(p => p.Descripcion);
07.
columns.Bound(p => p.Escuela);
08.
columns.Bound(p => p.HoraInicio).Width(30).Format(
"{0: dd/MM/yyyy hh:mm tt}"
);
09.
columns.Bound(p => p.HoraTermino).Width(30).Format(
"{0: dd/MM/yyyy hh:mm tt}"
);
10.
columns.Bound(p => p.Lugar);
11.
columns.Bound(p => p.Estatus);
12.
columns.Bound(p => p.Cupo);
13.
columns.Bound(p => p.Inscritos);
14.
columns.Command(command => { command.Edit(); command.Destroy(); }).Width(172);
15.
})
16.
.ToolBar(toolbar =>
17.
{
18.
toolbar.Create();
19.
})
20.
.Editable(editable => editable.Mode(GridEditMode.InLine))
21.
.Pageable()
22.
.DataSource(dataSource => dataSource
23.
.Ajax()
24.
.PageSize(20)
25.
.Events(events =>
26.
{
27.
events.Error(
"error_handler"
);
28.
})
29.
.Model(model =>
30.
{
31.
model.Id(p => p.Id);
32.
model.Field(p => p.IdEvento).Editable(
false
).DefaultValue(idEvento);
33.
})
34.
.Create(update => update.Action(
"EditingInline_Create"
,
"EditarTaller"
))
35.
.Update(update => update.Action(
"EditingInline_Update"
,
"EditarTaller"
))
36.
.Destroy(update => update.Action(
"EditingInline_Destroy"
,
"EditarTaller"
))
37.
)
38.
)
Any help will be greatly appreciated, thanks in advanced.