0

当我在网格中编辑一个单元格时,将在单元格中放置一个零(“0”),与单元格值重叠。这个零在网格加载时不显示,并且在更新发生时它不会保存到数据库中。如果我离开然后回来,零就消失了。只有当我编辑单元格时才会发生这种情况;如果我只单击单元格并启动内联编辑,则不会出现零。这发生在每个单元格中,甚至是日期。我的页面是一个 SPA。这是构建网格的代码:

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" }
        ]
    });

}

幻影零号

4

1 回答 1

0

我很抱歉,更新毕竟没有工作。零是来自服务器的响应。不过还是很奇怪的行为。

于 2013-07-29T22:15:03.517 回答