Cannot resolve method
‘Grid(MVCGrid_Kendo.Models.ModelName candidates are…
Add the following line to the controller (This solution is
for MCV + Kendo UI)
private YourModel db
= new YourModel();
ViewBag[“ItemaName”]
= db.YourModel.ToList();
In
View:
@(Html.Kendo().Grid((IEnumerable<YourSolutionName.YourModelName>)ViewBag.ItemaName)
.Name("GrdMyGrid")
.Columns(columns =>
{
columns.Bound(s => s.Id).Groupable(false);
columns.Bound(s => s.Name);
columns.Bound(s => s.IsActive);
})
.Groupable()
.Pageable()
.Sortable()
.Scrollable()
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("Details", " GrdMyGrid "))
)
)
No comments:
Post a Comment