Kendo ui 服务器更新后的kendu ui网格单元格保持标记为;肮脏的;

Kendo ui 服务器更新后的kendu ui网格单元格保持标记为;肮脏的;,kendo-ui,kendo-grid,Kendo Ui,Kendo Grid,我基于kendu grid ui代码演示的这段代码。 每当我添加新记录时,它都会被发送到服务器端(c#handler) 从那里我将json转换为object。。等等 操作成功,kendu发出的请求完成,状态代码为200。 但由于某些原因,被更改的单元格仍然标记为“脏”。 因此,第一次尝试发送任何新行,因为它认为需要再次发送。这是我的密码: jQuery("#getallDataBTN").click( function () { $("#grid").k

我基于kendu grid ui代码演示的这段代码。 每当我添加新记录时,它都会被发送到服务器端(c#handler) 从那里我将json转换为object。。等等 操作成功,kendu发出的请求完成,状态代码为200。 但由于某些原因,被更改的单元格仍然标记为“脏”。 因此,第一次尝试发送任何新行,因为它认为需要再次发送。这是我的密码:

 jQuery("#getallDataBTN").click(
        function () {
            $("#grid").kendoGrid({
                dataSource: {
                    transport: {
                        read: {
                            url: "/WallEHandler.ashx?command=getallPermissions",
                            dataType: "json"
                        },
                        create: {
                            url: "/WallEHandler.ashx?command=addPermission",
                            dataType: "json",
                            type:"post"
                        },
                        update: {
                          //  url: "/WallEHandler.ashx?command=editPermission",
                          //  dataType: "jsonp"
                        },
                        parameterMap: function (options, operation) {
                            if (operation !== "read" && options.models) {
                                return { models: kendo.stringify(options.models) };
                            }
                        }
                    },
                    schema: {
                        model: {
                            id:"Method",
                            fields: {
                                Method: { type: "string" , validation: { required: true }},
                                ServiceType: { type: "string" ,validation: { required: true }},
                                Role: { type: "string" ,validation: { required: true }},
                                Permission: { type: "string" ,validation: { required: true }},
                                ExtendedData: { type: "string" }
                            }
                        }
                    },
                    pageSize: 100,
                    batch: true,
                },
                height:850,
                scrollable: true,
                sortable: true,
                filterable: true,
                pageable: {
                    input: true,
                    numeric: false
                },
                columns: [
                    "Method",
                     "ServiceType",
                     "Role",
                     { field: "Permission", editor: categoryDropDownEditor },
                     "ExtendedData"
                ],

                navigatable: true,
                toolbar: ["create", "save", "cancel"],
                editable: true
                //selectable: "row",
                //save: function(e)
              //  {
                  //alert("Save");
               // }
            });
        }
        );
我是否需要从服务器返回一些东西来告诉网格它成功了


感谢您的帮助

我想出来了,似乎成功请求的响应必须返回与发送相同的对象。(必须是kendu的某种内部验证)

c#:


在您的示例中注释掉更新参数有什么原因吗?是的,我目前没有使用它们(服务器端还不支持)。我的问题是创建。
 Response.Write(context.Request.Form["models"]);