Kendo UI 未调用网格的数据源销毁函数
Kendo UI Grid's datasource destroy function not called
我有带数据源的网格,传输方式设置为
transport: {
destroy: {
url: "http://demos.telerik.com/kendo-ui/service/products/destroy",
dataType: "jsonp" // "jsonp" is required for cross-domain requests; use "json" for same-domain requests
},
//destroy : function(options) {
// alert("2342");
// options.success();
//},
read: {
cache: false,
type: "GET",
url: "/founders/read",
dataType: "json",
data: { parentEntityId: parentId },
},
},
batch: false,
schema: {
data: "Data",
model: {
id: "Id",
fields: {
DateFrom: { type: "date" },
DateTo: { type: "date" },
}
},
total: "Total"
},
它工作正常,但是当我尝试使用函数(注释行)时 - 它没有被调用,但是我有对我的页面地址的 GET 请求。为什么?我检查了模型的 id 值 - 它是正确的。
您不能将 transport
定义函数与对象混合在一起。 IE。你不能有 destroy
的函数和 read
的 url。
我有带数据源的网格,传输方式设置为
transport: {
destroy: {
url: "http://demos.telerik.com/kendo-ui/service/products/destroy",
dataType: "jsonp" // "jsonp" is required for cross-domain requests; use "json" for same-domain requests
},
//destroy : function(options) {
// alert("2342");
// options.success();
//},
read: {
cache: false,
type: "GET",
url: "/founders/read",
dataType: "json",
data: { parentEntityId: parentId },
},
},
batch: false,
schema: {
data: "Data",
model: {
id: "Id",
fields: {
DateFrom: { type: "date" },
DateTo: { type: "date" },
}
},
total: "Total"
},
它工作正常,但是当我尝试使用函数(注释行)时 - 它没有被调用,但是我有对我的页面地址的 GET 请求。为什么?我检查了模型的 id 值 - 它是正确的。
您不能将 transport
定义函数与对象混合在一起。 IE。你不能有 destroy
的函数和 read
的 url。