Samples that are not samples, Fix the Documentation

4 posts, 0 answers
  1. Pat Tormey
    Pat Tormey avatar
    20 posts
    Member since:
    Feb 2010

    Posted 23 Apr 2013 Link to this post

    I'm trying to learn to use the Kendo grid.
    So I went to
    Where the Basic Usage shows columns First Last City Title Birthdate

    And here is the code for that under index.cshtml.

    @model IEnumerable<Kendo.Mvc.Examples.Models.ProductViewModel>

    .Columns(columns =>
    columns.Bound(p => p.ProductID).Groupable(false);
    columns.Bound(p => p.ProductName);
    columns.Bound(p => p.UnitPrice);
    columns.Bound(p => p.UnitsInStock);
    .DataSource(dataSource => dataSource
    .Read(read => read.Action("Products_Read", "Grid"))

    I'm finding your MVC docs obtuse enough without this kind of help.

    Same story on Binding to remote data.
    The DataSource calls an read method that isn't in the Remote_DataController.cs

    I really want to love your product..  So help me out fix the documentation.

    Pat NH USA
  2. Jayesh Goyani
    Jayesh Goyani avatar
    2733 posts
    Member since:
    May 2010

    Posted 24 Apr 2013 Link to this post


    These source files are added just for reference so you can get the basic idea how to achieve the same with the MVC wrappers. 
    Actually this is the source code from the MVC wrappers offline demos which you should have available under the following folder:

    C:\Program Files (x86)\Telerik\Kendo UI for ASP.NET MVC Q2 2012\Examples

    Note : 
    Please download sample demo from below link and let me know which kind of functionality you want in it.

    using System.Collections.Generic;
    using System.Data.Linq;
    using System.Linq;
    using System.Web.Mvc;
    using Kendo.Mvc.Examples.Models;
    using Kendo.Mvc.Extensions;
    using Kendo.Mvc.UI;
    using System;
    namespace Kendo.Mvc.Examples.Controllers
        public partial class GridController : Controller
            public ActionResult Index()
                return View(GetProducts());
            public ActionResult Remote_Data()
                return View("AjaxBinding");
            public ActionResult Products_Read([DataSourceRequest] DataSourceRequest request)
                return Json(GetProducts().ToDataSourceResult(request));
            private static IEnumerable<OrderViewModel> GetOrders()
                var northwind = new NorthwindDataContext();
                var loadOptions = new DataLoadOptions();
                loadOptions.LoadWith<Order>(o => o.Customer);
                northwind.LoadOptions = loadOptions;
                return northwind.Orders.Select(order => new OrderViewModel
                    ContactName = order.Customer.ContactName,
                    OrderDate = order.OrderDate,
                    OrderID = order.OrderID,
                    ShipAddress = order.ShipAddress,
                    ShipCountry = order.ShipCountry,
                    ShipName = order.ShipName,
                    EmployeeID = order.EmployeeID
            private static IEnumerable<ProductViewModel> GetProducts()
                var northwind = new NorthwindDataContext();
                return northwind.Products.Select(product => new ProductViewModel
                    ProductID = product.ProductID,
                    ProductName = product.ProductName,
                    UnitPrice = product.UnitPrice ?? 0,
                    UnitsInStock = product.UnitsInStock ?? 0,
                    UnitsOnOrder = product.UnitsOnOrder ?? 0,
                    Discontinued = product.Discontinued,
                    LastSupply = DateTime.Today
            private static IEnumerable<EmployeeViewModel> GetEmployees()
                var northwind = new NorthwindDataContext();
                return northwind.Employees.Select(employee => new EmployeeViewModel
                    EmployeeID = employee.EmployeeID,
                    FirstName = employee.FirstName,
                    LastName = employee.LastName,
                    Country = employee.Country,
                    City = employee.City,
                    Notes = employee.Notes,
                    Title = employee.Title,
                    Address = employee.Address,
                    HomePhone = employee.HomePhone

    Jayesh Goyani
  3. Nathan
    Nathan avatar
    43 posts
    Member since:
    Sep 2011

    Posted 27 May 2013 Link to this post

    Now in: 
    C:\Program Files (x86)\Telerik\Kendo UI for ASP.NET MVC Q1 2013\wrappers\aspnetmvc\Examples\Models

    Took me 45 minutes to find this.

    The Models are used in half the data-based examples.  They need to be easier to find.

    Multiply 45 minutes by how many customers you have, assume an hourly rate of £100 / $100 an hour an hour and work out how much money making this hard to find is costing.  That's all money people can't spend on Telerik products.  Probably hundreds of thousands of £/$s.
  4. Atanas Korchev
    Atanas Korchev avatar
    8462 posts

    Posted 28 May 2013 Link to this post


     The Models directory is the default place for storing  model classes in ASP.NET MVC applications. By default Visual Studio creates this folder and puts the authentication related model classes in there. 

     We have also documented the contents of the sample application.

    Atanas Korchev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top