Kendo ui 剑道ui模型在参数映射中始终为空

Kendo ui 剑道ui模型在参数映射中始终为空,kendo-ui,Kendo Ui,我使用剑道用户界面网格,除了更新,一切都很好。当我单击Revied列时,字段会变成一个复选框,我可以对其进行编辑,并且会调用更新,但在put请求中不会传递任何数据。如果在参数映射函数中设置断点,则模型为空。Javascript代码如下: var selfPayDataSource = new kendo.data.DataSource({ serverFiltering: true, // <-- Do filtering server-side serverPagin

我使用剑道用户界面网格,除了更新,一切都很好。当我单击Revied列时,字段会变成一个复选框,我可以对其进行编辑,并且会调用更新,但在put请求中不会传递任何数据。如果在参数映射函数中设置断点,则模型为空。Javascript代码如下:

var selfPayDataSource = new kendo.data.DataSource({
     serverFiltering: true, // <-- Do filtering server-side
     serverPaging: true, // <-- Do paging server-side
     serverSorting: true,
     autoSync: true,
     pageSize: 100,
     batch:false,
     //filter: generateDsFilter(),
     type: 'odata', // <-- Include OData style params on query string.
     sortable: {
         mode: "multiple",
         allowUnsort: true
     },
     pageable: {
         refresh: true
     },
     schema: {
         data: function (data) {
             return data.Items; // <-- The result is just the data, it doesn't need to be unpacked.
         },
         total: function (data) {
             return data["Count"]; // <-- The total items count is the data length.
         },
         model: {
             id: "SelfPayId",
             fields: {
                 resp_ind: { type: "string", editable: false },
                 cstsv_resolved: { type: "string", editable: false },
                 cstsv_rep: { type: "string", editable: false },
                 cstsv_comp_date: { type: "string", editable: false },
                 region: { type: "string", editable: false },
                 db: { type: "string", editable: false },
                 personid: { type: "string", editable: false },
                 legacyid: { type: "string", editable: false },
                 account__: { type: "string", editable: false },
                 deceased: { type: "string", editable: false },
                 patient_name: { type: "string", editable: false },
                 account_balance: { type: "number", editable: false },
                 pat_last_paid_date: { type: "date", editable: false },
                 pat_last_paid_amt: { type: "number", editable: false },
                 acct_stat: { type: "string", editable: false },
                 bill_type: { type: "string", editable: false },
                 acct_score: { type: "number", editable: false },
                 tu_status: { type: "string", editable: false },
                 scoring: { type: "number", editable: false },
                 coll_ltr: { type: "string", editable: false },
                 HighestPriPlan: { type: "string", editable: false },
                 HighestSecPlan: { type: "string", editable: false },
                 HighestTerPlan: { type: "string", editable: false },
                 Max_DOS_Aging_Group: { type: "string", editable: false },
                 Reviewed: { type: "boolean", editable: true },
                 Collector_Name: { type: "string", editable: false}
             }
         }
     },
     transport: {
         read: {
             url: "/api/SelfPayData/Get", // <-- Get data from here
             dataType: "json" // <-- The default was "jsonp"
         },
         update: {
             url: "/api/SelfPayData/PUT",
             dataType: "json", // <-- The default was "jsonp"
             contentType: "application/json; charset=utf-8",
             type: "PUT"
         },
         parameterMap: function (data, operation) {

             if (operation != "read") {

                 return JSON.stringify(data.models);
             } else {
                 var paramMap = kendo.data.transports.odata.parameterMap(data);

                 var orderBy = paramMap.$orderby;

                 if (orderBy == undefined) {
                     orderBy = "account__";
                 }else {
                     orderBy = orderBy + ",account__";
                 }

                 paramMap.$orderby = orderBy;

                 var filter = paramMap.$filter;

                 if (filter == null || filter == '') {
                     delete paramMap.$filter;
                 }

                 delete paramMap.$format; // <-- remove format parameter.

                 return paramMap;
             }
         }
     }
 });


 $(function () {
     $("#grid").kendoGrid({
         sortable: true,
         pageable: true,
         scrollable: true,
         resizable: true,
         editable: true,
         navigatable: true,
         filterable: {
             extra: false,
             operators: {
                 string: {
                     startswith: "Starts with",
                     eq: "Is equal to",
                     neq: "Is not equal to"
                 }
             }
         },
         columns: [
                   {
                       field: "cstsv_resolved",
                       title: "Cstsv Resolved",
                       width: "5em",
                       filterable: true
                   },
                   {
                       field: "cstsv_rep",
                       title: "Cstsv Rep",
                       width: "8em",
                       filterable: true
                   },
                   {
                       field: "cstsv_comp_date",
                       title: "Cstsv Comp Date",
                       width: "6em",
                       filterable: true
                   },
                   {
                       field: "region",
                       title: "Region",
                       width: "5em",
                       filterable: true
                   },
                   {
                       field: "db",
                       title: "DB",
                       width: "4em",
                       filterable: true
                   },
                   {
                       field: "personid",
                       title: "Person ID",
                       width: "6em",
                       filterable: true
                   },
                   {
                       field: "legacyid",
                       title: "Legacy ID",
                       width: "6em",
                       filterable: true
                   },
                   {
                       field: "account__",
                       title: "Account #",
                       width: "6em",
                       filterable: true
                   },
                   {
                       field: "deceased",
                       title: "Deceased",
                       width: "5.2em",
                       filterable: true
                   },
                   {
                       field: "patient_name",
                       title: "Patient Name",
                       width: "6em",
                       filterable: true
                   },
                   {
                       field: "account_balance",
                       title: "Account Balance",
                       width: "5em",
                       filterable: true,
                       format: "{0:c2}"
                   },
                   {
                       field: "pat_last_paid_date",
                       title: "Pat Last Paid Date",
                       width: "6em",
                       format: "{0: MM-dd-yyyy}",
                       filterable: true
                   },
                   {
                       field: "pat_last_paid_amt",
                       title: "Pat Last Paid Amt",
                       width: "6em",
                       filterable: true,
                       format: "{0:c2}"
                   },
                   {
                       field: "acct_stat",
                       title: "Acct Stat",
                       width: "5em",
                       filterable: true
                   },
                   {
                       field: "bill_type",
                       title: "Bill Type",
                       width: "5em",
                       filterable: true
                   },
                   {
                       field: "acct_score",
                       title: "Acct Score",
                       width: "4em",
                       filterable: true
                   },
                   {
                       field: "tu_status",
                       title: "TU Status",
                       width: "6em",
                       filterable: true
                   },
                   {
                       field: "scoring",
                       title: "Scoring",
                       width: "4em",
                       filterable: true
                   },
                   {
                       field: "coll_ltr",
                       title: "Coll Ltr",
                       width: "5em",
                       filterable: true
                   },
                   {
                       field: "HighestPriPlan",
                       title: "Pri Plan",
                       width: "5em",
                       filterable: true
                   },
                   {
                       field: "HighestSecPlan",
                       title: "Sec Plan",
                       width: "5em",
                       filterable: true
                   },
                   {
                       field: "HighestTerPlan",
                       title: "Ter Plan",
                       width: "5em",
                       filterable: true
                   },
                   {
                       field: "Max_DOS_Aging_Group",
                       title: "DOS Aging Group",
                       width: "5em",
                       filterable: true
                   },
                   {
                       field: "Reviewed",
                       title: "Reviewed",
                       width: "10em",
                       filterable: true
                   },
                    {
                        field: "Collector_Name",
                        title: "Collector Name",
                        width: "10em",
                        filterable: true
                    }
                  ],
         dataSource: selfPayDataSource
     });
 });
var selfPayDataSource=new kendo.data.DataSource({

serverFiltering:true,//只有当
批处理
选项设置为
true
时,
模型
字段才可用。这里似乎不是这样。当
批处理
设置为
时,模型字段在
数据
参数中公开