View 剑道格网更新按钮未启动
我有剑道UI内联网格。它正确读取并填充网格。但当我在任何列中按edit和changes并按update时,更新事件不会触发。而且它也不调用控制器方法 我的看法View 剑道格网更新按钮未启动,view,kendo-grid,View,Kendo Grid,我有剑道UI内联网格。它正确读取并填充网格。但当我在任何列中按edit和changes并按update时,更新事件不会触发。而且它也不调用控制器方法 我的看法 $(document).ready(function () { dataSource = new kendo.data.DataSource({ transport: { read: {
$(document).ready(function () {
dataSource = new kendo.data.DataSource({
transport:
{
read:
{
url: "/Student/StudentGrid",
contentType: "application/json; charset=utf-8",
dataType: "json",
type: "GET"
},
update:
{
url: "@Url.Action("EditStudentDetails")",
contentType: "application/json;charset=utf-8",
dataType: "json",
type: "POST"
},
parameterMap: function (options, operation) {
if (operation != "read" && options) {
if (operation != "destroy") {
return JSON.stringify({
studentViewModel: options
});
}
else if (operation == "destroy") {
return JSON.stringify({
id: options.Id
});
}
}
}
},
parse: function (test) {
if (test.success) {
if (test.type != "read") {
alert(test.message);
$("#grid").data("kendoGrid").dataSource.read();
}
return test.data;
}
else {
alert(test.message);
return [];
}
}
})
$("#grid").kendoGrid({
dataSource: dataSource,
filterable: true,
toolbar: ["create"],
sortable: true,
pageable: true,
columns: [
{
field: "Id",
width: 120,
visible: false
},
{
field: "Name",
title: "Student Name",
editor: AutocompleteName,
width: 180
},
{
field: "CourseName",
title: "Course Name",
editor: CourseDropDownEditor,
width: 200,
template: "#=CourseName#"
},
{
command: ["edit", "destroy"], title: " ", width: "250px"
}
],
editable: "inline"
});
我在这方面做错了什么,当我单击“编辑”按钮时,它正在更改为可编辑模式,但当我单击“更新”时,它不起作用,因为您的任何单元格文本都有类似“”的HTML标记,请删除它们,然后单击“更新”并检查更新事件