如前所述,我正在尝试使用带有 RestFull url的 jqGrid 内联编辑。现在,当 jqGrid 向服务器发布数据时,我们可以将 id 查询参数更改为其他内容,而不是 id。
例如:服务器端域对象是客户,客户 ID 作为身份键。
现在,在 jqGrid 中,我将 jsonReader 选项中的 id 设置为
jsonReader : {
root: "rows",
page: "page",
total: "total",
records: "records",
repeatitems: false,
cell: "cell",
id: "customerId"
},
现在,当数据发布到服务器时,jqGrid 发布id:something
. 我想customerId:something
作为参数。这可能与一些 jqGrid 配置或 serializeRowData 函数是唯一的选择。