我有这个架构,
schema: {
data: "d.Data", // web methods return JSON in the following format { "d": <result> }. Specify how to get the result.
total: "d.Total",
model: {
在运输中:
update: {
url: "VisorEuroProv.aspx/Update", //specify the URL which should create new records. This is the Create method of the Products.asmx service.
contentType: "application/json; charset=utf-8", // tells the web method to serialize JSON
type: "POST" //use HTTP POST request as the default GET is not allowed for web methods
//complete: function(e) { $("#grid").data("kendoGrid").dataSource.read()}
},
和WebMethod
[WebMethod]
public static void Update(IEnumerable<dtoVisorEuroProveedores> dtoVisorEuroProveedores)
{...}
更新正常,但没有关闭BatchEdit,显示javascript错误:未捕获TypeError:无法读取属性'Data'为null
答案 0 :(得分:0)
最后,我返回IEnumerable< myObject >
变量的List()。