Problem with date when updating grid record

HI,

I have this grid:

$("#ListaNotificacionesNavicare").ejGrid({
                    dataSource: ej.DataManager({ json: ej.parseJSON(result.listaNotificaciones), updateUrl: "/home/ActualizarNotificacionesNavicare", adaptor: "remoteSaveAdaptor" }),
                    columns: [
                        { field: "Id", isPrimaryKey: true, visible: false },
                        { field: "Notificada", headerText: "Leído", editType: "booleanedit", width: "3em" },
                        { field: "Cliente", headerText: "Cliente", allowEditing: false, width: "15em" },
                        { field: "Descripcion", headerText: "Proceso", allowEditing: false, width: "25em" },
                        { field: "FechaCreacion", headerText: "Fecha", allowEditing: false, format: "{0:yyyy-MM-dd HH:mm:ss}", width: "10em" },
                        { field: "TiempoTranscurrido", headerText: "Tiempo transcurrido", allowEditing: false, width: "8em" },
                        { field: "NombreUsuario", headerText: "Responsable", allowEditing: false, width: "8em" },
                    ],
                    enableTouch: false,
                    //locale: "es-CO",
                    allowScrolling: true,
                    isResponsive: true,
                    allowPaging: true,
                    allowSorting: true,
                    allowFiltering: true,
                    exportToExcelAction: "/Home/NotificacionesExportToExcel",
                    rowDataBound: "CambiarColorFila",
                    dataBound: "OnDataBound",
                    queryCellInfo: "CalcularTiempoTranscurrido",
                    editSettings: { allowEditing: true },
                    toolbarSettings: {
                        showToolbar: true,
                        toolbarItems: [ ej.Grid.ToolBarItems.Update, ej.Grid.ToolBarItems.Cancel, ej.Grid.ToolBarItems.ExcelExport ],
                        customToolbarItems: [{ templateID: "#NoLeidos" }, { templateID: "#Todos" }]
                    },
                    toolbarClick: "FiltrarLeidos"
                });

When updating a record, I am getting an error about date format, the error is just before calling the update function (the url).

I am attaching images of what is happenning.

BeforeEditing.png shows the state of the grid when it is loaded. Note the date column.
Editing.png shows the state of the record when it is edited. Note that the date cell format is changed and shows the date as it is in the datasource.
ErrorInVisualStudio.png is the error message I am getting after clicking the update button.
Continuing the execution in visual studio, I have a breakpoint in the controller action that updates the grid, AfterError.png is a screenshot of the content of value at that point.
Finally, AfterUpdating.png shows the final result of the record modified. Note that the date is now is different.




Attachment: ErrorInDatesUpdatinGrid_e74a03be.zip

1 Reply

VN Vignesh Natarajan Syncfusion Team July 19, 2018 12:20 PM UTC

Hi Juan, 

Thanks for using Syncfusion products.  

According to your query that you are facing issue with date column (disabled from editing) while editing a record. We have prepared a sample using your code example. We are not able to reproduce the reported issue at our end.  

Kindly download the sample from below link 


Kindly share the following details to reproduce the reported issue at our end.  

  1. Share the full grid rendering (you have used rowDatabound, querycellinfo event but couldn’t find the codes related to it).
  2. Share the stack trace of the script error /exception thrown.
  3. Share the details the dataSource returned from the server. is it date value in ISO or DateTime format?
  4. If possible try to reproduce the reported issue in provided sample.

Regards, 
Vignesh Natarajan   




Loader.
Up arrow icon