【发布时间】:2013-08-30 04:40:27
【问题描述】:
我已经创建了 asp.net MVC 4 应用程序,我在其中使用实体框架和类“数据”是模型。
AdventureWorksTrainingEntities _dbContext = new AdventureWorksTrainingEntities();
Data _data = new Data(); //Model
现在我想将表格的数据显示到剑道网格。在控制器中,我使用以下代码:
public ActionResult Index()
{
List<Movie> dataForGrid= _dbContext.Movies.ToList();
return View(dataForGrid);
}
现在我不知道如何在 Kendo Grid 中显示数据(我是 kendo 和 MVC 的新手)。我也尝试了以下但不工作:
@model IEnumerable<MvcApp.Models.Data>
@using Kendo.Mvc.UI
@{
ViewBag.Title = "Index";
}
<h2>Grid For Data</h2>
Html.Kendo().Grid<Order>()
.Name("Grid")
.DataSource(dataSource => dataSource // Not implemented
)
【问题讨论】:
标签: asp.net-mvc asp.net-mvc-4 kendo-ui kendo-grid kendo-asp.net-mvc