【发布时间】:2016-08-12 21:52:39
【问题描述】:
我已经将它简化为它的准系统 - 拉出任何可能会干扰的属性(如果你愿意,我可以将它们放回原处) - 甚至将它指向本地 .json - 并且仍然在我的网格中没有数据。
我确实在我放入的样本中看到了指向 Northwind api 的数据,所以我知道我的 i 被划线并且 t 被点缀。
<div id="grid"></div>
这是在我的控制器中:
$("#grid").kendoGrid({
dataSource: {
type: "odata",
transport: {
read: 'Content/data/Listings.json'
}
},
height: 550,
columns: [{
field: "Id",
title: "Id",
width: 240
},{
field: "State",
title: "State",
width: 240
}]
});
它的调用是这样的(我无法控制):
http://localhost/Wizmo-web/Content/data/Listings.json?$callback=jQuery112103831734413679999_1470962161424&"%"24inlinecount=allpages&"%"24format=json
它正在从我的 Listings.json 返回数据(我已确保它是有效的):
[
{
"Id":557,
"State":"active",
"Title":"Matching Father Son Shirts I Am Your Father Shirt ",
},
{
"Id":558,
"State":"active",
"Title":"Baseball Hoodies Im All About That Base Hooded Swe",
}
]
但是我的网格是空的。 没有错误,什么都没有。
难倒。
【问题讨论】: