I am developing a project in MVC 5 using KENDO Telerik. In that I am using Kendo gridview.
this is my code
View Code:
@(Html.Kendo().Grid(Model)
.Name("grid")
.Columns(columns =>
{
columns.Bound(c => c.ad_user_id).Title("User");
columns.Bound(c => c.title).Title("Title Description");
columns.Bound(c => c.date_created).Title("Created Date");
//columns.Bound(Html.);
})
//.HtmlAttributes(new { style = "height: 380px;" })
.Scrollable()
.Groupable()
.Sortable()
.Pageable()
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("ViewChangeLogs", "ExternalApplicationa"))
)
)
Controller code
public ActionResult ManageUsers(string name, [DataSourceRequest]DataSourceRequest request)
{
IQueryable
DataSourceResult result = users.ToDataSourceResult(request);
return Json(result);
}
error:
The result of a query cannot be enumerated more than once.
How to use kendo gridview in mvc 5. Is anything wrong in my code.I need to implement paging, sorting and all those things,
Guest UserPosted Jan 27, 2015, 7:44 AM
Also, shouldn't ManageUsers be in your read.Action instead of ViewChangeLogs?