I tried to bind Kendo Grid.but it shows me below error
The model item passed into the dictionary is of type 'System.Data.Entity.DbSet
1[KendoApp.Product]', but this dictionary requires a model item of type 'System.Collections.Generic.IEnumerable1[KendoApp.Models.ProductModels]'.
My View
@model IEnumerable<KendoApp.Models.ProductModels> @(Html.Kendo().Grid(Model) .Name("Grid") .Columns(columns => { columns.Bound(p => p.ProductID); columns.Bound(p => p.ProductName); columns.Bound(p => p.UnitPrice); columns.Bound(p => p.UnitsInStock); }).Pageable() ) My Controller
public ActionResult KendoGrid() { //IEnumerable<Product> products = new northwindEntities().Products; var products = new northwindEntities().Products; ViewBag.Products = products; return View(products); Product Model
public class ProductModels { public int ProductID { get; set; } public string ProductName { get; set; } public Nullable<int> SupplierID { get; set; } public Nullable<int> CategoryID { get; set; } public string QuantityPerUnit { get; set; } public Nullable<decimal> UnitPrice { get; set; } public Nullable<short> UnitsInStock { get; set; } public Nullable<short> UnitsOnOrder { get; set; } public Nullable<short> ReorderLevel { get; set; } public bool Discontinued { get; set; } } } What is the error ? how to fix that ?