public ActionResult CustomServerBinding([DataSourceRequest(Prefix = "Grid")] DataSourceRequest request)
        {
            if (request.PageSize == 0)
            {
                request.PageSize = 10;
            }

            IQueryable <Order> orders = new NorthwindDataContext().Orders;

            orders = orders.ApplyFiltering(request.Filters);

            var total = orders.Count();

            orders = orders.ApplySorting(request.Groups, request.Sorts);

            orders = orders.ApplyPaging(request.Page, request.PageSize);

            IEnumerable data = orders.ApplyGrouping(request.Groups);

            ViewData["total"] = total;

            return(View(data));
        }