json 结果只是显示在屏幕上,而不是填充网格。
public ActionResult BulkEdit([DataSourceRequest]DataSourceRequest request)
{
var NewAssets = db.TurnaroundDumps;
DataSourceResult result = NewAssets.ToDataSourceResult(request)
return Json(result, JsonRequestBehavior.AllowGet);
}
然后在我看来:
@(Html.Kendo().Grid<PcInventory_v1_1.Models.TurnaroundDump>()
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.AssetTag);
columns.Bound(p => p.SerialNumber);
columns.Bound(p => p.DeptId);
columns.Bound(p => p.Location);
})
.DataSource(dataSource => dataSource
.Ajax() // Specify that the data source is of ajax type
.Read(read => read.Action("BulkEdit", "Assets"))
// Specify the action method and controller name
).Pageable()
)
出了什么问题?