【发布时间】:2012-05-19 14:02:00
【问题描述】:
网络方法:
<WebMethod()>
Public Shared Function Pcpacking() As IEnumerable(Of Packing)
Dim db As New STOREEntities
Return db.PC_PACKING_HISTORIES. _
Where(Function(q) q.PACK_DATE > "1388/11/07"). _
Select(Function(q) New Packing _
With {.Packdate = q.PACK_DATE,
.Packserialnumber = q.PACK_SERIAL_NUMBER,
.Netweight = q.NET_WEIGHT,
.Packusername = q.PACK_USER_NAME}).ToList()
End Function
脚本:
$(function () {
$("#grid").kendoGrid({
height: 200,
columns: [
{ field: "Packserialnumber", width: "150px" },
{ field: "Netweight", width: "50px" },
{ field: "Packusername", width: "150px" },
{ field: "Packdate", width: "100px" }
],
editable: false,
dataSource: {
schema: {
data: "d",
model: {
id: "Packserialnumber",
fields: {
Packserialnumber: { editable: false, nullable: true },
Netweight: { type: "number", validation: { required: true, min: 1} },
Packusername: { validation: { required: true} },
Packdate: { validation: { required: true} }
}
}
},
batch: false,
transport: {
read: {
url: "Default.aspx/Pcpacking",
contentType: "application/json; charset=utf-8",
type: "POST"
}
}
}
});
});
在这种情况下(PACK_DATE > "1388/11/07" 366 条记录)一切正常。但是当我将日期更改为 1388/11/06 1260 条记录或 1388/11/05 5460 条记录 或 ... 出现以下错误:
{"Message":"使用JSON JavaScriptSerializer进行序列化或反序列化时出错。字符串的长度超过了值 在 maxJsonLength 属性上设置。 ","StackTrace":" 在 System.Web.Script.Serialization.JavaScriptSerializer。 序列化(对象 obj,StringBuilder 输出,SerializationFormat 序列化格式)\r\n 在 System.Web.Script.Serialization.JavaScriptSerializer.Serialize(对象 对象, SerializationFormat 序列化格式)\r\n 在 System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext 语境, WebServiceMethodData 方法数据,IDictionary`2 rawParams)\r\n
在 System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext 上下文,WebServiceMethodData 方法数据)", "ExceptionType":"System.InvalidOperationException"}
我认为剑道网格不支持大数据。有什么建议吗?
对不起我的英语不好。
【问题讨论】:
-
谢谢@UnhandledException
-
转到此链接 :) 希望已解决。 stackoverflow.com/questions/36192517/…
标签: jquery asp.net vb.net kendo-ui