After edit of Grid cell, the value is overlapped with a zero.

2 posts, 1 answers
  1. Robert
    Robert avatar
    11 posts
    Member since:
    Jan 2012

    Posted 29 Jul 2013 Link to this post

    When I edit a cell in my grid, a zero ("0") is placed in the cell, overlapping the cell value. This zero does not show when the grid loads, and it does not save to the database when the update happens. If I navigate away and come back, the zero is gone. It only happens if I edit the cell; if I only click in the cell and initiate the inline editing, no zero appears. 
    My page is an SPA.
    Attached is a zoomed in screenshot showing the phantom zero.
    This is the code that builds the grid:

        function fnLoadStorageVaults(storageid) {

            var ds = new kendo.data.DataSource({
                transport: {
                    read: {
                        url: URL_GETVAULTS,
                        dataType: "json",
                        type: "GET",
                        data: { StorageID: storageid }
                    },
                    update: { dataType: "json", url: URL_UPDATEVAULTS, type: "POST" },
                    destroy: { url: URL_DELETEVAULT, type: "POST" },
                    create: { url: URL_INSERTVAULT, type: "POST" },
                    parameterMap: function (data, type) {
                        return kendo.stringify(data);
                    }
                },
                autoSync: true,
                schema: {
                    model: { 
                        id: "StorageVaultID",
                        fields: {
                            VaultNumber: { type: "string", editable: true },
                            Section: { type: "string", editable: true },
                            Row: { type: "string", editable: true },
                            DateFrom: { type: "date", editable: true },
                            DateTo: { type: "date", editable: true },
                            WarehouseID: { type: "number", editable: true }
                        }
                    }
                }
            });
            
            $("#VaultGrid").kendoGrid({
                dataSource: ds
                , sortable: true
                , editable: true
                , navigable: true
                , columns: [
                    { field: "WarehouseID", title: "Warehouse", width: "60px" }
                    ,{ field: "VaultNumber", title: "Vault Nbr.", width: "60px" }
                    , { field: "Section", title: "Section" }
                    , { field: "Row", title: "Row" }
                    , { field: "DateFrom", title: "Date In" }
                    , { field: "DateTo", title: "Date Out" }
                ]
            });

        }
  2. Answer
    Robert
    Robert avatar
    11 posts
    Member since:
    Jan 2012

    Posted 29 Jul 2013 Link to this post

    My apologies, the update was not working after all. The zero was the response from the server. Still curious behavior though.
Back to Top