ASP.Net MVC3 View with Kendo Grid Control rendering data in Json format RRS feed

  • Question

  • User248087600 posted

    Hi all,


    I am using kendo grid for binding and displaying data from database. but Json formatted data of Product table record getting rendered on browser. I am expecting data in kendo Grid.

    this is my controller code

    public ActionResult Products_Read([DataSourceRequest]DataSourceRequest request)
    using (var northwind = new NorthwindEntities())
    IQueryable<Product> products = northwind.Products;
    DataSourceResult result = products.ToDataSourceResult(request);
    return Json(result);

    and this is my view code

    .DataSource(dataSource => dataSource 
    .Read(read => read.Action("Products_Read", "Home")) 
    .Columns(columns =>
    columns.Bound(product => product.ProductID);
    columns.Bound(product => product.ProductName);
    columns.Bound(product => product.UnitsInStock);

    Please help me to resolve the same.


    Friday, August 14, 2015 6:50 AM


All replies