0
我想綁定我的KendoUI網格,並且在控制檯中出現500服務器錯誤。我唯一能想到的就是它不喜歡「@(Html.Kendo()。Grid()」,但intellisense不會錯誤的出現。看起來像是我的項目設置有問題嗎?任何建議都會非常感謝,下面是我在我的控制器和Index.cshtml頁。Kendo UI網格不綁定
public ActionResult Customers_Read([DataSourceRequest]DataSourceRequest request) {
using (var ctx = new DataEntities()) {
IQueryable<Customer> customers = ctx.Customers;
DataSourceResult result = customers.ToDataSourceResult(request);
return Json(result);
}
@(Html.Kendo().Grid<DataLibrary.Customer>()
.Name("grid")
.Columns(columns => {
columns.Bound(c => c.Name);
columns.Bound(c => c.Phone);
columns.Bound(c => c.Fax);
columns.Bound(c => c.Website);
})
.Sortable()
.Pageable(pageable => pageable
.Refresh(true)
.PageSizes(true)
.ButtonCount(5))
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("Customers_Read", "Customers"))
)
)
我在布萊恩當我回家時試試。當我去/ Customers/Customers_Read它的錯誤,當我GOOGLE了錯誤人們說添加AllowGet。當我嘗試瀏覽到我的Customers_Read操作時是否應該錯誤? telerik網站上的演示真的會出錯嗎? – JTunney