C# 剑道网格未加载数据webforms
我很难让kendoGrid绑定到ASPX页面中web方法的JSON数据。我不断得到无限旋转器。JSON来自ajax调用。我不知道为什么它不绑定到网格。这是我的JSC# 剑道网格未加载数据webforms,c#,webforms,kendo-ui,kendo-grid,C#,Webforms,Kendo Ui,Kendo Grid,我很难让kendoGrid绑定到ASPX页面中web方法的JSON数据。我不断得到无限旋转器。JSON来自ajax调用。我不知道为什么它不绑定到网格。这是我的JS $('#grid').kendoGrid({ columns: [ { field: "ClientName", title: "ClientName" }], dataSource: { type
$('#grid').kendoGrid({
columns: [
{
field: "ClientName",
title: "ClientName"
}],
dataSource: {
type: 'json',
serverPaging: true,
schema: {
data: 'd'
},
transport: {
read: function (options) {
$.ajax({
type: 'POST',
url: 'ServiceMonitoring.aspx/GetGridInformation',
dataType: 'json',
data: '',
contentType: 'application/json; charset=utf-8',
serverPaging: true,
success: function (msg) {
options.success(msg.d);
}
});
}
}
},
height: 200,
pageSize: 10
});
我知道这对你来说有点太晚了,但是试着用 数据:JSON.parse(d) 希望这能帮助其他面对这个问题的人
谢谢。尝试打开页面
ServiceMonitoring.aspx/GetGridInformation
,检查服务器是否返回数据。如果是,请检查格式是否符合预期。顺便问一下:为什么你使用AJAX来加载内容,而不仅仅是提供URL?