public ActionResult GetCustomersManualPaging(int page, int size)
        {
            var context = new TelerikDemoDataContext(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);

            var result = context.GetCustomersPaged(page, size).ToList();
            var gridModel = new GridModel{
                Data = result,
                Total = 91
            };

            return View(gridModel);
        }
        public ActionResult SearchFormGrid(string customerId, string companyName,string contactName, string postalCode)
        {
            var context = new TelerikDemoDataContext(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);

            var customers = context.Customers.AsQueryable();

            if (!string.IsNullOrEmpty(customerId))
                customers = customers.Where(r => r.CustomerID == customerId);
            if (!string.IsNullOrEmpty(companyName))
                customers = customers.Where(r => r.CompanyName == companyName);
            if (!string.IsNullOrEmpty(contactName))
                customers = customers.Where(r => r.ContactName == contactName);
            if (!string.IsNullOrEmpty(postalCode))
                customers = customers.Where(r => r.PostalCode == postalCode);

            return View(new GridModel(customers));
        }
 public ActionResult StaticBinding()
 {
     var context = new TelerikDemoDataContext(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
     return View(context.Customers.ToList());
 }
        public ActionResult GetGridDataForAjaxBinding(int someValue)
        {
            var context = new TelerikDemoDataContext(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);

            return View(new GridModel(context.Customers));
        }