我有一个场景,我想在一个提交按钮按下时保存 kendo 网格批量编辑和表单中的其他字段。我想使用这种场景,因为我必须将整个表单保存在一个 sql 事务中。
问问题
597 次
1 回答
0
You might get it implementing a transport.parameterMap
function where you create the data structure that you want to send.
Example:
function(options, operation) {
if (operation !== "read" && options.models) {
return {
data: options.models,
field1: $("#form_field1").val(),
};
}
}
Where data
is the original data and field1
is the one got from your form
and in an html
input
field which id
is form_field1
.
Alternatively, you can use transport.update.data
where you can define extra data to send to the server on an update
(same exists for read
, destroy
and create
).
Here you would have something like:
transport: {
update: {
data: function() {
return {
field1: $("#form_field1").val()
}
}
}
}
于 2013-01-05T11:25:31.117 回答