Skip to content

Commit 5412527

Browse files
committed
Add detail-grid-excel-export-all-pages-all-details project
1 parent f8f6042 commit 5412527

File tree

72 files changed

+63015
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+63015
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2012
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KendoUIMVC5", "KendoUIMVC5\KendoUIMVC5.csproj", "{F06CAD57-4977-46EB-8CC1-2BC40656BBF8}"
5+
EndProject
6+
Global
7+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8+
Debug|Any CPU = Debug|Any CPU
9+
Release|Any CPU = Release|Any CPU
10+
EndGlobalSection
11+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
12+
{F06CAD57-4977-46EB-8CC1-2BC40656BBF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13+
{F06CAD57-4977-46EB-8CC1-2BC40656BBF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
14+
{F06CAD57-4977-46EB-8CC1-2BC40656BBF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
15+
{F06CAD57-4977-46EB-8CC1-2BC40656BBF8}.Release|Any CPU.Build.0 = Release|Any CPU
16+
EndGlobalSection
17+
GlobalSection(SolutionProperties) = preSolution
18+
HideSolutionNode = FALSE
19+
EndGlobalSection
20+
EndGlobal
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System.Web;
2+
using System.Web.Optimization;
3+
4+
namespace KendoUIMVC5
5+
{
6+
public class BundleConfig
7+
{
8+
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
9+
public static void RegisterBundles(BundleCollection bundles)
10+
{
11+
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
12+
"~/Scripts/jquery-{version}.js"));
13+
14+
// Use the development version of Modernizr to develop with and learn from. Then, when you're
15+
// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
16+
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
17+
"~/Scripts/modernizr-*"));
18+
19+
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
20+
"~/Scripts/bootstrap.js",
21+
"~/Scripts/respond.js"));
22+
23+
bundles.Add(new StyleBundle("~/Content/css").Include(
24+
"~/Content/bootstrap.css",
25+
"~/Content/site.css"));
26+
}
27+
}
28+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using System.Web;
2+
using System.Web.Mvc;
3+
4+
namespace KendoUIMVC5
5+
{
6+
public class FilterConfig
7+
{
8+
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
9+
{
10+
filters.Add(new HandleErrorAttribute());
11+
}
12+
}
13+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.Mvc;
6+
using System.Web.Routing;
7+
8+
namespace KendoUIMVC5
9+
{
10+
public class RouteConfig
11+
{
12+
public static void RegisterRoutes(RouteCollection routes)
13+
{
14+
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
15+
16+
routes.MapRoute(
17+
name: "Default",
18+
url: "{controller}/{action}/{id}",
19+
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
20+
);
21+
}
22+
}
23+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
using Kendo.Mvc.UI;
2+
using Kendo.Mvc.Extensions;
3+
using KendoUIMVC5.Models;
4+
using System;
5+
using System.Collections.Generic;
6+
using System.Linq;
7+
using System.Web;
8+
using System.Web.Mvc;
9+
10+
namespace KendoUIMVC5.Controllers
11+
{
12+
public class HomeController : Controller
13+
{
14+
public ActionResult Index()
15+
{
16+
ViewBag.Message = "Welcome to ASP.NET MVC!";
17+
18+
return View();
19+
}
20+
21+
public ActionResult Employees([DataSourceRequest] DataSourceRequest request)
22+
{
23+
using (var northwind = new NorthwindEntities())
24+
{
25+
return Json(northwind.Employees.ToDataSourceResult(request, e => new EmployeeViewModel
26+
{
27+
EmployeeID = e.EmployeeID,
28+
FirstName = e.FirstName,
29+
LastName = e.LastName,
30+
Country = e.Country,
31+
City = e.City,
32+
Title = e.Title
33+
}));
34+
}
35+
}
36+
37+
public ActionResult Orders([DataSourceRequest] DataSourceRequest request, int? employeeID)
38+
{
39+
using (var northwind = new NorthwindEntities())
40+
{
41+
IQueryable<Order> Orders = northwind.Orders;
42+
43+
if (employeeID != null)
44+
{
45+
Orders = Orders.Where(order => order.EmployeeID == employeeID);
46+
}
47+
48+
return Json(Orders.ToDataSourceResult(request, o => new OrderViewModel
49+
{
50+
EmployeeID = o.EmployeeID,
51+
OrderID = o.OrderID,
52+
ShipCountry = o.ShipCountry,
53+
ShipAddress = o.ShipAddress,
54+
ShipName = o.ShipName
55+
})
56+
);
57+
}
58+
}
59+
}
60+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<%@ Application Codebehind="Global.asax.cs" Inherits="KendoUIMVC5.MvcApplication" Language="C#" %>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.Mvc;
6+
using System.Web.Optimization;
7+
using System.Web.Routing;
8+
9+
namespace KendoUIMVC5
10+
{
11+
public class MvcApplication : System.Web.HttpApplication
12+
{
13+
protected void Application_Start()
14+
{
15+
AreaRegistration.RegisterAllAreas();
16+
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
17+
RouteConfig.RegisterRoutes(RouteTable.Routes);
18+
BundleConfig.RegisterBundles(BundleTable.Bundles);
19+
}
20+
}
21+
}
Loading

0 commit comments

Comments
 (0)