├── GridViewNumericList ├── Views │ ├── _ViewStart.cshtml │ ├── Home │ │ └── Index.cshtml │ ├── web.config │ └── Shared │ │ ├── _Layout.cshtml │ │ ├── _Grid.cshtml │ │ └── _GridPager.cshtml ├── Global.asax ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff ├── Models │ ├── Car.cs │ └── GridMvcFilter.cs ├── Content │ ├── Site.css │ └── Gridmvc.css ├── Global.asax.cs ├── App_Start │ └── RouteConfig.cs ├── packages.config ├── Scripts │ ├── gridmvc.lang.ru.js │ ├── gridmvc.min.js │ └── bootstrap.min.js ├── Controllers │ └── HomeController.cs ├── Web.Debug.config ├── Web.Release.config ├── Properties │ └── AssemblyInfo.cs ├── Grid.mvc.readme ├── Web.config ├── Extensions │ └── MyGridExtensions.cs ├── Filters │ └── GridMvcAttribute.cs └── GridViewNumericList.csproj ├── packages ├── jQuery.1.10.2 │ ├── jQuery.1.10.2.nupkg │ └── Tools │ │ ├── install.ps1 │ │ ├── uninstall.ps1 │ │ └── common.ps1 ├── Grid.Mvc.3.0.0 │ ├── Grid.Mvc.3.0.0.nupkg │ ├── lib │ │ └── net40 │ │ │ └── GridMvc.dll │ └── Content │ │ ├── web.config.transform │ │ ├── Scripts │ │ ├── gridmvc.lang.ru.js │ │ └── gridmvc.min.js │ │ ├── Views │ │ └── Shared │ │ │ ├── _GridPager.cshtml │ │ │ └── _Grid.cshtml │ │ ├── Grid.mvc.readme │ │ └── Content │ │ └── Gridmvc.css ├── Modernizr.2.6.2 │ ├── Modernizr.2.6.2.nupkg │ └── Tools │ │ ├── uninstall.ps1 │ │ ├── install.ps1 │ │ └── common.ps1 ├── bootstrap.3.0.0 │ ├── bootstrap.3.0.0.nupkg │ └── content │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff │ │ └── Scripts │ │ └── bootstrap.min.js ├── repositories.config ├── Microsoft.AspNet.Mvc.5.2.0 │ ├── lib │ │ └── net45 │ │ │ └── System.Web.Mvc.dll │ ├── Microsoft.AspNet.Mvc.5.2.0.nupkg │ └── Content │ │ ├── Web.config.uninstall.xdt │ │ └── Web.config.install.xdt ├── Microsoft.AspNet.Razor.3.2.0 │ ├── lib │ │ └── net45 │ │ │ └── System.Web.Razor.dll │ └── Microsoft.AspNet.Razor.3.2.0.nupkg ├── Microsoft.AspNet.WebPages.3.2.0 │ ├── lib │ │ └── net45 │ │ │ ├── System.Web.Helpers.dll │ │ │ ├── System.Web.WebPages.dll │ │ │ ├── System.Web.WebPages.Razor.dll │ │ │ ├── System.Web.WebPages.Deployment.dll │ │ │ ├── System.Web.WebPages.Deployment.xml │ │ │ └── System.Web.WebPages.Razor.xml │ ├── Microsoft.AspNet.WebPages.3.2.0.nupkg │ └── Content │ │ ├── Web.config.uninstall.xdt │ │ └── Web.config.install.xdt └── Microsoft.Web.Infrastructure.1.0.0.0 │ ├── Microsoft.Web.Infrastructure.1.0.0.0.nupkg │ └── lib │ └── net40 │ └── Microsoft.Web.Infrastructure.dll ├── README.md ├── GridViewNumericList.sln ├── .gitattributes └── .gitignore /GridViewNumericList/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /GridViewNumericList/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="GridViewNumericList.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /packages/jQuery.1.10.2/jQuery.1.10.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/packages/jQuery.1.10.2/jQuery.1.10.2.nupkg -------------------------------------------------------------------------------- /packages/Grid.Mvc.3.0.0/Grid.Mvc.3.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/packages/Grid.Mvc.3.0.0/Grid.Mvc.3.0.0.nupkg -------------------------------------------------------------------------------- /packages/Grid.Mvc.3.0.0/lib/net40/GridMvc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/packages/Grid.Mvc.3.0.0/lib/net40/GridMvc.dll -------------------------------------------------------------------------------- /packages/Modernizr.2.6.2/Modernizr.2.6.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/packages/Modernizr.2.6.2/Modernizr.2.6.2.nupkg -------------------------------------------------------------------------------- /packages/bootstrap.3.0.0/bootstrap.3.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/packages/bootstrap.3.0.0/bootstrap.3.0.0.nupkg -------------------------------------------------------------------------------- /packages/repositories.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /GridViewNumericList/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/GridViewNumericList/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /GridViewNumericList/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/GridViewNumericList/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /GridViewNumericList/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/GridViewNumericList/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.2.0/lib/net45/System.Web.Mvc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/packages/Microsoft.AspNet.Mvc.5.2.0/lib/net45/System.Web.Mvc.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.2.0/Microsoft.AspNet.Mvc.5.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/packages/Microsoft.AspNet.Mvc.5.2.0/Microsoft.AspNet.Mvc.5.2.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Razor.3.2.0/lib/net45/System.Web.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/packages/Microsoft.AspNet.Razor.3.2.0/lib/net45/System.Web.Razor.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Razor.3.2.0/Microsoft.AspNet.Razor.3.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/packages/Microsoft.AspNet.Razor.3.2.0/Microsoft.AspNet.Razor.3.2.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.Helpers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.Helpers.dll -------------------------------------------------------------------------------- /packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/Microsoft.AspNet.WebPages.3.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/packages/Microsoft.AspNet.WebPages.3.2.0/Microsoft.AspNet.WebPages.3.2.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.Razor.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.Deployment.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.Deployment.dll -------------------------------------------------------------------------------- /packages/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/packages/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Web.Infrastructure.1.0.0.0/lib/net40/Microsoft.Web.Infrastructure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/GridMvcItemsPage/master/packages/Microsoft.Web.Infrastructure.1.0.0.0/lib/net40/Microsoft.Web.Infrastructure.dll -------------------------------------------------------------------------------- /packages/Grid.Mvc.3.0.0/Content/web.config.transform: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/Modernizr.2.6.2/Tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # Update the _references.js file 6 | Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx -------------------------------------------------------------------------------- /GridViewNumericList/Models/Car.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace GridViewNumericList.Models 7 | { 8 | public class Car 9 | { 10 | public int Id { get; set; } 11 | public string Model { get; set; } 12 | public int Year { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GridMvcItemsPage 2 | GridView Em ASP.NET MVC com Itens Por Página 3 | Por padrão ele tem paginação, filtro e ordenação, porém não disponibilizar uma opção para informar a quantidade de itens a serem exibidos, a não ser de forma estática no backend. 4 | Desenvolvi uma solução que está atendendo muito bem as necessidades dos projetos que tenho trabalhado e espero que possa ajudar algum de vocês também. 5 | -------------------------------------------------------------------------------- /packages/Modernizr.2.6.2/Tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | if ($scriptsFolderProjectItem -eq $null) { 6 | # No Scripts folder 7 | Write-Host "No Scripts folder found" 8 | exit 9 | } 10 | 11 | # Update the _references.js file 12 | AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx $modernizrFileName -------------------------------------------------------------------------------- /GridViewNumericList/Content/Site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Set padding to keep content from hitting the edges */ 7 | .body-content { 8 | padding-left: 15px; 9 | padding-right: 15px; 10 | } 11 | 12 | /* Set width on the form input elements since they're 100% wide by default */ 13 | input, 14 | select, 15 | textarea { 16 | max-width: 280px; 17 | } 18 | 19 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.2.0/Content/Web.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /GridViewNumericList/Global.asax.cs: -------------------------------------------------------------------------------- 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 GridViewNumericList 9 | { 10 | public class MvcApplication : System.Web.HttpApplication 11 | { 12 | protected void Application_Start() 13 | { 14 | AreaRegistration.RegisterAllAreas(); 15 | RouteConfig.RegisterRoutes(RouteTable.Routes); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /GridViewNumericList/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using GridMvc.Html 2 | @model IEnumerable 3 | 4 | @{ 5 | ViewBag.Title = "Car List"; 6 | } 7 | 8 |

Car List

9 |
10 | @Html.Grid(Model).Columns(col => 11 | { 12 | col.Add(c => c.Id).Titled("Id").Filterable(true); 13 | col.Add(c => c.Model).Titled("Model"); 14 | col.Add(c => c.Year).Titled("Year"); 15 | }).WithPaging((int)ViewBag.ItemsPerPage).Sortable(true).Filterable(true).WithMultipleFilters() 16 |
-------------------------------------------------------------------------------- /GridViewNumericList/Models/GridMvcFilter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace GridViewNumericList.Models 7 | { 8 | public class GridMvcFilter 9 | { 10 | public const int DefaultPagesize = 10; 11 | public string Id { get; set; } 12 | public string Controller { get; set; } 13 | public string Action { get; set; } 14 | public string GridOrd { get; set; } 15 | public string CurrentFilter { get; set; } 16 | public string GridFilter { get; set; } 17 | public int? GridPage { get; set; } 18 | public int? GridPageSize { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/Content/Web.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /GridViewNumericList/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 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 GridViewNumericList 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 | } 24 | -------------------------------------------------------------------------------- /GridViewNumericList/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /GridViewNumericList/Scripts/gridmvc.lang.ru.js: -------------------------------------------------------------------------------- 1 | /*** 2 | * Grid.Mvc russian language (ru-RU) http://gridmvc.codeplex.com/ 3 | */ 4 | window.GridMvc = window.GridMvc || {}; 5 | window.GridMvc.lang = window.GridMvc.lang || {}; 6 | GridMvc.lang.ru = { 7 | filterTypeLabel: "Тип фильтра: ", 8 | filterValueLabel: "Значение:", 9 | applyFilterButtonText: "Применить", 10 | filterSelectTypes: { 11 | Equals: "Равно", 12 | StartsWith: "Начинается с", 13 | Contains: "Содержит", 14 | EndsWith: "Оканчивается", 15 | GreaterThan: "Больше", 16 | LessThan: "Меньше" 17 | }, 18 | code: 'ru', 19 | boolTrueLabel: "Да", 20 | boolFalseLabel: "Нет", 21 | clearFilterLabel: "Очистить фильтр" 22 | }; -------------------------------------------------------------------------------- /packages/Grid.Mvc.3.0.0/Content/Scripts/gridmvc.lang.ru.js: -------------------------------------------------------------------------------- 1 | /*** 2 | * Grid.Mvc russian language (ru-RU) http://gridmvc.codeplex.com/ 3 | */ 4 | window.GridMvc = window.GridMvc || {}; 5 | window.GridMvc.lang = window.GridMvc.lang || {}; 6 | GridMvc.lang.ru = { 7 | filterTypeLabel: "Тип фильтра: ", 8 | filterValueLabel: "Значение:", 9 | applyFilterButtonText: "Применить", 10 | filterSelectTypes: { 11 | Equals: "Равно", 12 | StartsWith: "Начинается с", 13 | Contains: "Содержит", 14 | EndsWith: "Оканчивается", 15 | GreaterThan: "Больше", 16 | LessThan: "Меньше" 17 | }, 18 | code: 'ru', 19 | boolTrueLabel: "Да", 20 | boolFalseLabel: "Нет", 21 | clearFilterLabel: "Очистить фильтр" 22 | }; -------------------------------------------------------------------------------- /GridViewNumericList/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using GridViewNumericList.Filters; 7 | using GridViewNumericList.Models; 8 | 9 | namespace GridViewNumericList.Controllers 10 | { 11 | public class HomeController : Controller 12 | { 13 | [GridMvcAttribute] 14 | public ActionResult Index() 15 | { 16 | var carList = new List(); 17 | for (int i = 1; i <= 50; i++) 18 | { 19 | carList.Add(new Car { Id = i, Model = "Model 0" + i, Year = 2010 + i }); 20 | } 21 | 22 | return View(carList.AsQueryable().OrderBy(a=>a.Model)); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /GridViewNumericList.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.30723.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GridViewNumericList", "GridViewNumericList\GridViewNumericList.csproj", "{56430587-CE2B-489A-A19C-6A48FDED029E}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {56430587-CE2B-489A-A19C-6A48FDED029E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {56430587-CE2B-489A-A19C-6A48FDED029E}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {56430587-CE2B-489A-A19C-6A48FDED029E}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {56430587-CE2B-489A-A19C-6A48FDED029E}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /GridViewNumericList/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /GridViewNumericList/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /packages/jQuery.1.10.2/Tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # VS 11 and above supports the new intellisense JS files 6 | $vsVersion = [System.Version]::Parse($dte.Version) 7 | $supportsJsIntelliSenseFile = $vsVersion.Major -ge 11 8 | 9 | if (-not $supportsJsIntelliSenseFile) { 10 | $displayVersion = $vsVersion.Major 11 | Write-Host "IntelliSense JS files are not supported by your version of Visual Studio: $displayVersion" 12 | exit 13 | } 14 | 15 | if ($scriptsFolderProjectItem -eq $null) { 16 | # No Scripts folder 17 | Write-Host "No Scripts folder found" 18 | exit 19 | } 20 | 21 | # Delete the vsdoc file from the project 22 | try { 23 | $vsDocProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("jquery-$ver-vsdoc.js") 24 | Delete-ProjectItem $vsDocProjectItem 25 | } 26 | catch { 27 | Write-Host "Error deleting vsdoc file: " + $_.Exception -ForegroundColor Red 28 | exit 29 | } 30 | 31 | # Copy the intellisense file to the project from the tools folder 32 | $intelliSenseFileSourcePath = Join-Path $toolsPath $intelliSenseFileName 33 | try { 34 | $scriptsFolderProjectItem.ProjectItems.AddFromFileCopy($intelliSenseFileSourcePath) 35 | } 36 | catch { 37 | # This will throw if the file already exists, so we need to catch here 38 | } 39 | 40 | # Update the _references.js file 41 | AddOrUpdate-Reference $scriptsFolderProjectItem $jqueryFileNameRegEx $jqueryFileName -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.2.0/Content/Web.config.install.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /GridViewNumericList/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("GridViewNumericList")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("GridViewNumericList")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("50ff9a3e-2cb7-40e0-bcbe-5edc0344fa5f")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /packages/jQuery.1.10.2/Tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # Determine the file paths 6 | $projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName 7 | $origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName 8 | 9 | if (Test-Path $projectIntelliSenseFilePath) { 10 | if ((Get-Checksum $projectIntelliSenseFilePath) -eq (Get-Checksum $origIntelliSenseFilePath)) { 11 | # The intellisense file in the project matches the file in the tools folder, delete it 12 | 13 | if ($scriptsFolderProjectItem -eq $null) { 14 | # No Scripts folder 15 | exit 16 | } 17 | 18 | try { 19 | # Get the project item for the intellisense file 20 | $intelliSenseFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item($intelliSenseFileName) 21 | } 22 | catch { 23 | # The item wasn't found 24 | exit 25 | } 26 | 27 | # Delete the project item 28 | Delete-ProjectItem $intelliSenseFileProjectItem 29 | } 30 | else { 31 | $projectScriptsFolderLeaf = Split-Path $projectScriptsFolderPath -Leaf 32 | Write-Host "Skipping '$projectScriptsFolderLeaf\$intelliSenseFileName' because it was modified." -ForegroundColor Magenta 33 | } 34 | } 35 | else { 36 | # The intellisense file was not found in project 37 | Write-Host "The intellisense file was not found in project at path $projectIntelliSenseFilePath" 38 | } 39 | 40 | # Update the _references.js file 41 | Remove-Reference $scriptsFolderProjectItem $jqueryFileNameRegEx -------------------------------------------------------------------------------- /packages/Grid.Mvc.3.0.0/Content/Views/Shared/_GridPager.cshtml: -------------------------------------------------------------------------------- 1 | @model GridMvc.Pagination.GridPager 2 | @if (Model == null || Model.PageCount <= 1) 3 | { 4 | return; 5 | } 6 |
7 |
    8 | @if (Model.CurrentPage > 1) 9 | { 10 |
  • 11 | « 12 |
  • 13 | } 14 | 15 | @if (Model.StartDisplayedPage > 1) 16 | { 17 |
  • 18 | 1 19 |
  • 20 | if (Model.StartDisplayedPage > 2) 21 | { 22 |
  • ...
  • 23 | } 24 | } 25 | @for (int i = Model.StartDisplayedPage; i <= Model.EndDisplayedPage; i++) 26 | { 27 | if (i == Model.CurrentPage) 28 | { 29 |
  • @i
  • 30 | } 31 | else 32 | { 33 |
  • @i
  • 34 | } 35 | } 36 | @if (Model.EndDisplayedPage < Model.PageCount) 37 | { 38 | if (Model.EndDisplayedPage < Model.PageCount - 1) 39 | { 40 |
  • ...
  • 41 | } 42 |
  • @Model.PageCount
  • 43 | } 44 | @if (Model.CurrentPage < Model.PageCount) 45 | { 46 |
  • »
  • 47 | } 48 |
49 |
50 | -------------------------------------------------------------------------------- /GridViewNumericList/Views/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /GridViewNumericList/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | @ViewBag.Title - My ASP.NET Application 7 | 8 | 9 | 10 | 11 | 12 | 13 | 29 | 30 |
31 | @RenderBody() 32 |
33 |
34 |

© @DateTime.Now.Year - My ASP.NET Application

35 |
36 |
37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/Content/Web.config.install.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /packages/Grid.Mvc.3.0.0/Content/Views/Shared/_Grid.cshtml: -------------------------------------------------------------------------------- 1 | @using GridMvc.Columns 2 | @model GridMvc.IGrid 3 | @if (Model == null) { return; } 4 | @if (Model.RenderOptions.RenderRowsOnly) 5 | { 6 | @RenderGridBody(); 7 | } 8 | else 9 | { 10 |
11 |
12 | 13 | @* Draw grid header *@ 14 | 15 | @RenderGridHeader() 16 | 17 | 18 | @RenderGridBody() 19 | 20 |
21 | @RenderGridPager() 22 |
23 |
24 | } 25 | @helper RenderGridBody() 26 | { 27 | if (!Model.ItemsToDisplay.Any()) 28 | { 29 | 30 | 31 | @Model.EmptyGridText 32 | 33 | 34 | } 35 | else 36 | { 37 | foreach (object item in Model.ItemsToDisplay) 38 | { 39 | 40 | @foreach (IGridColumn column in Model.Columns) 41 | { 42 | @column.CellRenderer.Render(column, column.GetCell(item)) 43 | } 44 | 45 | } 46 | } 47 | } 48 | @helper RenderGridHeader() 49 | { 50 | 51 | @foreach (IGridColumn column in Model.Columns) 52 | { 53 | @column.HeaderRenderer.Render(column) 54 | } 55 | 56 | } 57 | @helper RenderGridPager() 58 | { 59 | if (Model.EnablePaging && Model.Pager != null) 60 | { 61 | 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /GridViewNumericList/Grid.mvc.readme: -------------------------------------------------------------------------------- 1 | http://gridmvc.codeplex.com/ 2 | 3 | Note: Grid.Mvc installer has already made the following changes to your project: 4 | - Views/Shared/_Grid.cshtml, Views/Shared/_GridPager.cshtml - views for grid 5 | - Content/Gridmvc.css - default stylesheet for the grid 6 | - Scripts/gridmvc.js, Scripts/gridmvc.min.js - Grid.Mvc scripts 7 | - Reference GridMvc.dll 8 | 9 | Follow these steps to start use Grid.mvc: 10 | 11 | 1. Define a model for display in the grid, like: 12 | 13 | public class Foo 14 | { 15 | public string Title { get; set; } 16 | public string Description { get;set; } 17 | } 18 | 19 | 20 | 2. Prepare your model in your controller, like: 21 | 22 | public ActionResult Index() 23 | { 24 | var items = fooRepository.GetAll(); 25 | return View(items); 26 | } 27 | 28 | 29 | 3. Render GridMvc in the View: You can use Html helper extenstion: 30 | 31 | Reference Grid.Mvc.Html in your view: 32 | 33 | @using GridMvc.Html 34 | 35 | Render Grid.Mvc: 36 | 37 | @Html.Grid(Model).Columns(columns => 38 | { 39 | columns.Add(foo => foo.Title).Titled("Custom column title").SetWidth(110); 40 | columns.Add(foo => foo.Description).Sortable(true); 41 | }).WithPaging(20) 42 | 43 | 44 | 4. Register a grid stylesheet and scripts in your _Layouts.cshtml file: 45 | 46 | 47 | 48 | 49 | 50 | Notes: 51 | 52 | Default layout of Grid.Mvc uses Twitter Bootstrap (css framework). You also need to include stylesheets on your page. You can download it from - http://twitter.github.com/bootstrap/ 53 | like: 54 | 55 | 56 | 57 | 58 | Also you need to ensure that jQuery has registred on the page before gridmvc.min.js script. 59 | 60 | For more documetation, please see: http://gridmvc.codeplex.com/ -------------------------------------------------------------------------------- /packages/Grid.Mvc.3.0.0/Content/Grid.mvc.readme: -------------------------------------------------------------------------------- 1 | http://gridmvc.codeplex.com/ 2 | 3 | Note: Grid.Mvc installer has already made the following changes to your project: 4 | - Views/Shared/_Grid.cshtml, Views/Shared/_GridPager.cshtml - views for grid 5 | - Content/Gridmvc.css - default stylesheet for the grid 6 | - Scripts/gridmvc.js, Scripts/gridmvc.min.js - Grid.Mvc scripts 7 | - Reference GridMvc.dll 8 | 9 | Follow these steps to start use Grid.mvc: 10 | 11 | 1. Define a model for display in the grid, like: 12 | 13 | public class Foo 14 | { 15 | public string Title { get; set; } 16 | public string Description { get;set; } 17 | } 18 | 19 | 20 | 2. Prepare your model in your controller, like: 21 | 22 | public ActionResult Index() 23 | { 24 | var items = fooRepository.GetAll(); 25 | return View(items); 26 | } 27 | 28 | 29 | 3. Render GridMvc in the View: You can use Html helper extenstion: 30 | 31 | Reference Grid.Mvc.Html in your view: 32 | 33 | @using GridMvc.Html 34 | 35 | Render Grid.Mvc: 36 | 37 | @Html.Grid(Model).Columns(columns => 38 | { 39 | columns.Add(foo => foo.Title).Titled("Custom column title").SetWidth(110); 40 | columns.Add(foo => foo.Description).Sortable(true); 41 | }).WithPaging(20) 42 | 43 | 44 | 4. Register a grid stylesheet and scripts in your _Layouts.cshtml file: 45 | 46 | 47 | 48 | 49 | 50 | Notes: 51 | 52 | Default layout of Grid.Mvc uses Twitter Bootstrap (css framework). You also need to include stylesheets on your page. You can download it from - http://twitter.github.com/bootstrap/ 53 | like: 54 | 55 | 56 | 57 | 58 | Also you need to ensure that jQuery has registred on the page before gridmvc.min.js script. 59 | 60 | For more documetation, please see: http://gridmvc.codeplex.com/ -------------------------------------------------------------------------------- /GridViewNumericList/Views/Shared/_Grid.cshtml: -------------------------------------------------------------------------------- 1 | @using GridMvc.Columns 2 | @model GridMvc.IGrid 3 | @if (Model == null) { return; } 4 | 5 | @if (Model.RenderOptions.RenderRowsOnly) 6 | { 7 | @RenderGridBody(); 8 | } 9 | else 10 | { 11 |
12 |
13 | 14 | @* Draw grid header *@ 15 | 16 | @RenderGridHeader() 17 | 18 | 19 | @RenderGridBody() 20 | 21 |
22 | @RenderGridPager() 23 |
24 |
25 | } 26 | @helper RenderGridBody() 27 | { 28 | if (!Model.ItemsToDisplay.Any()) 29 | { 30 | 31 | 32 | @Model.EmptyGridText 33 | 34 | 35 | } 36 | else 37 | { 38 | foreach (object item in Model.ItemsToDisplay) 39 | { 40 | 41 | @foreach (IGridColumn column in Model.Columns) 42 | { 43 | @column.CellRenderer.Render(column, column.GetCell(item)) 44 | } 45 | 46 | } 47 | } 48 | } 49 | @helper RenderGridHeader() 50 | { 51 | 52 | @foreach (IGridColumn column in Model.Columns) 53 | { 54 | @column.HeaderRenderer.Render(column) 55 | } 56 | 57 | } 58 | @helper RenderGridPager() 59 | { 60 | if (Model.EnablePaging && Model.Pager != null) 61 | { 62 | 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /GridViewNumericList/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /GridViewNumericList/Views/Shared/_GridPager.cshtml: -------------------------------------------------------------------------------- 1 | @model GridMvc.Pagination.GridPager 2 | @{ 3 | var itemsPerPageList = (IEnumerable)ViewBag.ListDropDown; 4 | } 5 | 6 | @if (Model == null || Model.PageCount < 1) 7 | { 8 | return; 9 | } 10 |
11 |
12 |
    13 | @if (Model.CurrentPage > 1) 14 | { 15 |
  • 16 | « 17 |
  • 18 | } 19 | 20 | @if (Model.StartDisplayedPage > 1) 21 | { 22 |
  • 23 | 1 24 |
  • 25 | if (Model.StartDisplayedPage > 2) 26 | { 27 |
  • ...
  • 28 | } 29 | } 30 | @for (int i = Model.StartDisplayedPage; i <= Model.EndDisplayedPage; i++) 31 | { 32 | if (i == Model.CurrentPage) 33 | { 34 |
  • @i
  • 35 | } 36 | else 37 | { 38 |
  • @i
  • 39 | } 40 | } 41 | @if (Model.EndDisplayedPage < Model.PageCount) 42 | { 43 | if (Model.EndDisplayedPage < Model.PageCount - 1) 44 | { 45 |
  • ...
  • 46 | } 47 |
  • @Model.PageCount
  • 48 | } 49 | @if (Model.CurrentPage < Model.PageCount) 50 | { 51 |
  • »
  • 52 | } 53 |
54 |
55 |
56 | @if (Model.ItemsCount > 0) 57 | { 58 | 59 | Página @Model.CurrentPage de @Model.PageCount 60 | - Exibindo até @Html.DropDownList("grid-page-size", itemsPerPageList, new { @onchange = "location = this.value" }) de @Model.ItemsCount Registros 61 | 62 | } 63 |
64 |
65 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /GridViewNumericList/Extensions/MyGridExtensions.cs: -------------------------------------------------------------------------------- 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.WebPages; 7 | using GridMvc; 8 | using GridMvc.Columns; 9 | using GridMvc.Html; 10 | 11 | namespace GridViewNumericList.Extensions 12 | { 13 | public static class MyGridExtenions 14 | { 15 | internal const string DefaultPartialViewName = "_Grid"; 16 | 17 | public static HtmlGrid Grid(this HtmlHelper helper, IEnumerable items) 18 | where T : class 19 | { 20 | return Grid(helper, items, DefaultPartialViewName); 21 | } 22 | 23 | public static HtmlGrid Grid(this HtmlHelper helper, IEnumerable items, string viewName) 24 | where T : class 25 | { 26 | return Grid(helper, items, GridRenderOptions.Create(string.Empty, viewName)); 27 | } 28 | 29 | public static HtmlGrid Grid(this HtmlHelper helper, IEnumerable items, 30 | GridRenderOptions renderOptions) 31 | where T : class 32 | { 33 | var newGrid = new Grid(items.AsQueryable()); 34 | newGrid.RenderOptions = renderOptions; 35 | var htmlGrid = new HtmlGrid(newGrid, helper.ViewContext, renderOptions.ViewName); 36 | return htmlGrid; 37 | } 38 | 39 | public static HtmlGrid Grid(this HtmlHelper helper, Grid sourceGrid) 40 | where T : class 41 | { 42 | //wrap source grid: 43 | var htmlGrid = new HtmlGrid(sourceGrid, helper.ViewContext, DefaultPartialViewName); 44 | return htmlGrid; 45 | } 46 | 47 | public static HtmlGrid Grid(this HtmlHelper helper, Grid sourceGrid, string viewName) 48 | where T : class 49 | { 50 | //wrap source grid: 51 | var htmlGrid = new HtmlGrid(sourceGrid, helper.ViewContext, viewName); 52 | return htmlGrid; 53 | } 54 | 55 | //support IHtmlString in RenderValueAs method 56 | public static IGridColumn RenderValueAs(this IGridColumn column, Func constraint) 57 | { 58 | Func valueContraint = a => constraint(a).ToHtmlString(); 59 | return column.RenderValueAs(valueContraint); 60 | } 61 | 62 | //support WebPages inline helpers 63 | public static IGridColumn RenderValueAs(this IGridColumn column, 64 | Func> constraint) 65 | { 66 | Func valueContraint = a => constraint(a)(null).ToHtmlString(); 67 | return column.RenderValueAs(valueContraint); 68 | } 69 | } 70 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.sln.docstates 8 | 9 | # Build results 10 | 11 | [Dd]ebug/ 12 | [Rr]elease/ 13 | x64/ 14 | build/ 15 | [Bb]in/ 16 | [Oo]bj/ 17 | 18 | # Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets 19 | !packages/*/build/ 20 | 21 | # MSTest test Results 22 | [Tt]est[Rr]esult*/ 23 | [Bb]uild[Ll]og.* 24 | 25 | *_i.c 26 | *_p.c 27 | *.ilk 28 | *.meta 29 | *.obj 30 | *.pch 31 | *.pdb 32 | *.pgc 33 | *.pgd 34 | *.rsp 35 | *.sbr 36 | *.tlb 37 | *.tli 38 | *.tlh 39 | *.tmp 40 | *.tmp_proj 41 | *.log 42 | *.vspscc 43 | *.vssscc 44 | .builds 45 | *.pidb 46 | *.log 47 | *.scc 48 | 49 | # Visual C++ cache files 50 | ipch/ 51 | *.aps 52 | *.ncb 53 | *.opensdf 54 | *.sdf 55 | *.cachefile 56 | 57 | # Visual Studio profiler 58 | *.psess 59 | *.vsp 60 | *.vspx 61 | 62 | # Guidance Automation Toolkit 63 | *.gpState 64 | 65 | # ReSharper is a .NET coding add-in 66 | _ReSharper*/ 67 | *.[Rr]e[Ss]harper 68 | 69 | # TeamCity is a build add-in 70 | _TeamCity* 71 | 72 | # DotCover is a Code Coverage Tool 73 | *.dotCover 74 | 75 | # NCrunch 76 | *.ncrunch* 77 | .*crunch*.local.xml 78 | 79 | # Installshield output folder 80 | [Ee]xpress/ 81 | 82 | # DocProject is a documentation generator add-in 83 | DocProject/buildhelp/ 84 | DocProject/Help/*.HxT 85 | DocProject/Help/*.HxC 86 | DocProject/Help/*.hhc 87 | DocProject/Help/*.hhk 88 | DocProject/Help/*.hhp 89 | DocProject/Help/Html2 90 | DocProject/Help/html 91 | 92 | # Click-Once directory 93 | publish/ 94 | 95 | # Publish Web Output 96 | *.Publish.xml 97 | 98 | # NuGet Packages Directory 99 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 100 | #packages/ 101 | 102 | # Windows Azure Build Output 103 | csx 104 | *.build.csdef 105 | 106 | # Windows Store app package directory 107 | AppPackages/ 108 | 109 | # Others 110 | sql/ 111 | *.Cache 112 | ClientBin/ 113 | [Ss]tyle[Cc]op.* 114 | ~$* 115 | *~ 116 | *.dbmdl 117 | *.[Pp]ublish.xml 118 | *.pfx 119 | *.publishsettings 120 | 121 | # RIA/Silverlight projects 122 | Generated_Code/ 123 | 124 | # Backup & report files from converting an old project file to a newer 125 | # Visual Studio version. Backup files are not needed, because we have git ;-) 126 | _UpgradeReport_Files/ 127 | Backup*/ 128 | UpgradeLog*.XML 129 | UpgradeLog*.htm 130 | 131 | # SQL Server files 132 | App_Data/*.mdf 133 | App_Data/*.ldf 134 | 135 | 136 | #LightSwitch generated files 137 | GeneratedArtifacts/ 138 | _Pvt_Extensions/ 139 | ModelManifest.xml 140 | 141 | # ========================= 142 | # Windows detritus 143 | # ========================= 144 | 145 | # Windows image file caches 146 | Thumbs.db 147 | ehthumbs.db 148 | 149 | # Folder config file 150 | Desktop.ini 151 | 152 | # Recycle Bin used on file shares 153 | $RECYCLE.BIN/ 154 | 155 | # Mac desktop service store files 156 | .DS_Store 157 | -------------------------------------------------------------------------------- /packages/Modernizr.2.6.2/Tools/common.ps1: -------------------------------------------------------------------------------- 1 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) { 2 | try { 3 | $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") 4 | } 5 | catch { 6 | # _references.js file not found 7 | return 8 | } 9 | 10 | if ($referencesFileProjectItem -eq $null) { 11 | # _references.js file not found 12 | return 13 | } 14 | 15 | $referencesFilePath = $referencesFileProjectItem.FileNames(1) 16 | $referencesTempFilePath = Join-Path $env:TEMP "_references.tmp.js" 17 | 18 | if ((Select-String $referencesFilePath -pattern $fileNamePattern).Length -eq 0) { 19 | # File has no existing matching reference line 20 | # Add the full reference line to the beginning of the file 21 | "/// " | Add-Content $referencesTempFilePath -Encoding UTF8 22 | Get-Content $referencesFilePath | Add-Content $referencesTempFilePath 23 | } 24 | else { 25 | # Loop through file and replace old file name with new file name 26 | Get-Content $referencesFilePath | ForEach-Object { $_ -replace $fileNamePattern, $newFileName } > $referencesTempFilePath 27 | } 28 | 29 | # Copy over the new _references.js file 30 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 31 | Remove-Item $referencesTempFilePath -Force 32 | } 33 | 34 | function Remove-Reference($scriptsFolderProjectItem, $fileNamePattern) { 35 | try { 36 | $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") 37 | } 38 | catch { 39 | # _references.js file not found 40 | return 41 | } 42 | 43 | if ($referencesFileProjectItem -eq $null) { 44 | return 45 | } 46 | 47 | $referencesFilePath = $referencesFileProjectItem.FileNames(1) 48 | $referencesTempFilePath = Join-Path $env:TEMP "_references.tmp.js" 49 | 50 | if ((Select-String $referencesFilePath -pattern $fileNamePattern).Length -eq 1) { 51 | # Delete the line referencing the file 52 | Get-Content $referencesFilePath | ForEach-Object { if (-not ($_ -match $fileNamePattern)) { $_ } } > $referencesTempFilePath 53 | 54 | # Copy over the new _references.js file 55 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 56 | Remove-Item $referencesTempFilePath -Force 57 | } 58 | } 59 | 60 | # Extract the version number from the file in the package's content\scripts folder 61 | $packageScriptsFolder = Join-Path $installPath Content\Scripts 62 | $modernizrFileName = Join-Path $packageScriptsFolder "modernizr-*.js" | Get-ChildItem -Exclude "*.min.js","*-vsdoc.js" | Split-Path -Leaf 63 | $modernizrFileNameRegEx = "modernizr-((?:\d+\.)?(?:\d+\.)?(?:\d+\.)?(?:\d+)).js" 64 | $modernizrFileName -match $modernizrFileNameRegEx 65 | $ver = $matches[1] 66 | 67 | # Get the project item for the scripts folder 68 | try { 69 | $scriptsFolderProjectItem = $project.ProjectItems.Item("Scripts") 70 | $projectScriptsFolderPath = $scriptsFolderProjectItem.FileNames(1) 71 | } 72 | catch { 73 | # No Scripts folder 74 | Write-Host "No scripts folder found" 75 | } -------------------------------------------------------------------------------- /GridViewNumericList/Content/Gridmvc.css: -------------------------------------------------------------------------------- 1 | /*** 2 | * Grid.Mvc stylesheet http://gridmvc.codeplex.com/ 3 | * This file contains default styles for Grid.Mvc. 4 | */ 5 | /* Grid */ 6 | table.grid-table { margin: 0; } 7 | table.grid-table .grid-wrap { padding: 0; position: relative; } 8 | table.grid-table .grid-empty-text { color: #666; } 9 | 10 | /* Grid headers */ 11 | table.grid-table .grid-header { position: relative; } 12 | table.grid-table .grid-header .sorted-asc .grid-sort-arrow:after { content: " \2193"; } 13 | table.grid-table .grid-header .sorted-desc .grid-sort-arrow:after { content: " \2191"; } 14 | table.grid-table .grid-header > .grid-header-title { width: 100%; margin-right: 15px; white-space: nowrap; } 15 | 16 | /* Grid body */ 17 | table.grid-table tr.grid-row-selected td { background: #4888C2 !important; color: white; } 18 | table.grid-table tr.grid-row-selected a { color: white; } 19 | 20 | /* Grid filtering */ 21 | input.grid-filter-input { padding: 4px; font-size: 13px; } 22 | table.grid-table .grid-filter { position: relative; margin-top: 2px; float: right; width: 10px; height: 12px; } 23 | table.grid-table .grid-filter-btn { cursor: pointer; display: block; width: 10px; height: 12px; background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAJFJREFUKFNjkJSU/E8MZvj//78DMRhkoj+6bizYH2SiiIeHx2FjY+P/2DBIDqSGAQSOHTtmYWZm9hldEUgMJAdWBAJAHSzt7e056ApBYiA5qDIIAAoIhIaGroYpArFBYlBpVLB3715DmEIQGyqMCUDWwBRiWIkOYAqhXNwApMjX13c7lIsbgBQBrdWAcqGAgQEAdOGTrvsYKXIAAAAASUVORK5CYII=') no-repeat; } 24 | table.grid-table .grid-filter-btn.filtered { background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAJNJREFUKFNjYGj//58o/P//fwdiMIOkpKQ/VhOQMFgNULWIh4fHYWNj4//YMEgOpIYBBI4dO2ZhZmb2GV0RSAwkB1YEAkAdLO3t7TnoCkFiIDmoMggACgiEhoauhikCsUFiUGlUsHfvXkOYQhAbKowJQNbAFGJYiQ5gCqFc3ACkyNfXdzuUixuAFAGt1YByoYCBAQAUDanUpFB4UQAAAABJRU5ErkJggg==') no-repeat; } 25 | table.grid-table .grid-filter-buttons { padding: 0; } 26 | table.grid-table .grid-filter-datepicker { font-size: 12px; } 27 | table.grid-table .grid-filter-datepicker table td { padding: 1px!important; } 28 | table.grid-table .grid-filter-datepicker .ui-datepicker { width: auto; } 29 | table.grid-table .grid-dropdown-inner ul.menu-list li a.grid-filter-clear { white-space: nowrap; padding-left: 23px; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAARpJREFUKFNjYGj//58o/P//fwdiMIOkpKQ/VhOQMFgNULWIh4fHYWNj4//YMEgOpIYBBI4dO2axOC/396GinP/O+vpwRVbGxl92+vluXm1kuASsEKiD5VB99aG3eTH/HxjL/A/RUPsfrqb6f7e21uutlhbRYEUwAFQskOLmun2+lND/0xxM/7dycXzd6OxoCpVGBduWLjXv4+f/v5WF+f9RbtYvfeysqlApBKhhY2Hcxsy0+xAL038nbe3/m8W4ss/Jcx2GSiPAal6uvGtczP9TFOXBHgGJ7RHlmLGOjy0UrAAGzgT7rn7urP/P3NDgv6+v73aQWAMzM+dqTtbJYAUwsNzeyuhImE8GSBHQYxpQYYYJQCcxMDAwAAB7/bt5uWh9FAAAAABJRU5ErkJggg=='); background-position: 3px center; background-repeat: no-repeat; } 30 | table.grid-table .grid-filter-choose.choose-selected { background-color: white!important; cursor: default; color: #999; } 31 | table.grid-table .grid-popup-additional { padding: 3px 0 0 0; } 32 | 33 | /* POP-UP */ 34 | .grid-dropdown { font-weight: normal; left: -102px; top: 16px!important; min-width: 180px; } 35 | .grid-dropdown-arrow { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAICAYAAADJEc7MAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAl0lEQVQoU42PMQuFMAyE6xN5gpOjjsIb/P9/o3O3zh27dY25kIPq8DBwmLT35WoQkUEVOmGec84CaW2q7+N+AdCD6M9SisQYTei1jsfyCeCu+vjFVGs1AN++94DRfUOfuNLoKUiyRC5y2F5I8NdaM4P/l0EswvBorQTnfxBhLMRih+2pklIy+eEtjQPu6MNZwIBNbwteMBd5X4ZGHcwL3QAAAABJRU5ErkJggg==") no-repeat; height: 8px; left: 99px; position: absolute; top: -8px; width: 14px; } 36 | .grid-dropdown-inner { padding: 5px 7px; } 37 | .grid-dropdown ul.menu-list { list-style-type: none; margin: 3px 0 0 0; padding: 0; } 38 | .grid-dropdown ul.menu-list li a { text-decoration: none; background-position: 6px center; background-repeat: no-repeat; display: block; padding: 4px 5px; } 39 | .grid-dropdown ul.menu-list li a:hover { background-color: #EEE; text-decoration: none; } 40 | -------------------------------------------------------------------------------- /packages/Grid.Mvc.3.0.0/Content/Content/Gridmvc.css: -------------------------------------------------------------------------------- 1 | /*** 2 | * Grid.Mvc stylesheet http://gridmvc.codeplex.com/ 3 | * This file contains default styles for Grid.Mvc. 4 | */ 5 | /* Grid */ 6 | table.grid-table { margin: 0; } 7 | table.grid-table .grid-wrap { padding: 0; position: relative; } 8 | table.grid-table .grid-empty-text { color: #666; } 9 | 10 | /* Grid headers */ 11 | table.grid-table .grid-header { position: relative; } 12 | table.grid-table .grid-header .sorted-asc .grid-sort-arrow:after { content: " \2193"; } 13 | table.grid-table .grid-header .sorted-desc .grid-sort-arrow:after { content: " \2191"; } 14 | table.grid-table .grid-header > .grid-header-title { width: 100%; margin-right: 15px; white-space: nowrap; } 15 | 16 | /* Grid body */ 17 | table.grid-table tr.grid-row-selected td { background: #4888C2 !important; color: white; } 18 | table.grid-table tr.grid-row-selected a { color: white; } 19 | 20 | /* Grid filtering */ 21 | input.grid-filter-input { padding: 4px; font-size: 13px; } 22 | table.grid-table .grid-filter { position: relative; margin-top: 2px; float: right; width: 10px; height: 12px; } 23 | table.grid-table .grid-filter-btn { cursor: pointer; display: block; width: 10px; height: 12px; background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAJFJREFUKFNjkJSU/E8MZvj//78DMRhkoj+6bizYH2SiiIeHx2FjY+P/2DBIDqSGAQSOHTtmYWZm9hldEUgMJAdWBAJAHSzt7e056ApBYiA5qDIIAAoIhIaGroYpArFBYlBpVLB3715DmEIQGyqMCUDWwBRiWIkOYAqhXNwApMjX13c7lIsbgBQBrdWAcqGAgQEAdOGTrvsYKXIAAAAASUVORK5CYII=') no-repeat; } 24 | table.grid-table .grid-filter-btn.filtered { background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAJNJREFUKFNjYGj//58o/P//fwdiMIOkpKQ/VhOQMFgNULWIh4fHYWNj4//YMEgOpIYBBI4dO2ZhZmb2GV0RSAwkB1YEAkAdLO3t7TnoCkFiIDmoMggACgiEhoauhikCsUFiUGlUsHfvXkOYQhAbKowJQNbAFGJYiQ5gCqFc3ACkyNfXdzuUixuAFAGt1YByoYCBAQAUDanUpFB4UQAAAABJRU5ErkJggg==') no-repeat; } 25 | table.grid-table .grid-filter-buttons { padding: 0; } 26 | table.grid-table .grid-filter-datepicker { font-size: 12px; } 27 | table.grid-table .grid-filter-datepicker table td { padding: 1px!important; } 28 | table.grid-table .grid-filter-datepicker .ui-datepicker { width: auto; } 29 | table.grid-table .grid-dropdown-inner ul.menu-list li a.grid-filter-clear { white-space: nowrap; padding-left: 23px; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAARpJREFUKFNjYGj//58o/P//fwdiMIOkpKQ/VhOQMFgNULWIh4fHYWNj4//YMEgOpIYBBI4dO2axOC/396GinP/O+vpwRVbGxl92+vluXm1kuASsEKiD5VB99aG3eTH/HxjL/A/RUPsfrqb6f7e21uutlhbRYEUwAFQskOLmun2+lND/0xxM/7dycXzd6OxoCpVGBduWLjXv4+f/v5WF+f9RbtYvfeysqlApBKhhY2Hcxsy0+xAL038nbe3/m8W4ss/Jcx2GSiPAal6uvGtczP9TFOXBHgGJ7RHlmLGOjy0UrAAGzgT7rn7urP/P3NDgv6+v73aQWAMzM+dqTtbJYAUwsNzeyuhImE8GSBHQYxpQYYYJQCcxMDAwAAB7/bt5uWh9FAAAAABJRU5ErkJggg=='); background-position: 3px center; background-repeat: no-repeat; } 30 | table.grid-table .grid-filter-choose.choose-selected { background-color: white!important; cursor: default; color: #999; } 31 | table.grid-table .grid-popup-additional { padding: 3px 0 0 0; } 32 | 33 | /* POP-UP */ 34 | .grid-dropdown { font-weight: normal; left: -102px; top: 16px!important; min-width: 180px; } 35 | .grid-dropdown-arrow { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAICAYAAADJEc7MAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAl0lEQVQoU42PMQuFMAyE6xN5gpOjjsIb/P9/o3O3zh27dY25kIPq8DBwmLT35WoQkUEVOmGec84CaW2q7+N+AdCD6M9SisQYTei1jsfyCeCu+vjFVGs1AN++94DRfUOfuNLoKUiyRC5y2F5I8NdaM4P/l0EswvBorQTnfxBhLMRih+2pklIy+eEtjQPu6MNZwIBNbwteMBd5X4ZGHcwL3QAAAABJRU5ErkJggg==") no-repeat; height: 8px; left: 99px; position: absolute; top: -8px; width: 14px; } 36 | .grid-dropdown-inner { padding: 5px 7px; } 37 | .grid-dropdown ul.menu-list { list-style-type: none; margin: 3px 0 0 0; padding: 0; } 38 | .grid-dropdown ul.menu-list li a { text-decoration: none; background-position: 6px center; background-repeat: no-repeat; display: block; padding: 4px 5px; } 39 | .grid-dropdown ul.menu-list li a:hover { background-color: #EEE; text-decoration: none; } 40 | -------------------------------------------------------------------------------- /packages/jQuery.1.10.2/Tools/common.ps1: -------------------------------------------------------------------------------- 1 | function Get-Checksum($file) { 2 | $cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider" 3 | 4 | $fileInfo = Get-Item $file 5 | trap { ; 6 | continue } $stream = $fileInfo.OpenRead() 7 | if ($? -eq $false) { 8 | # Couldn't open file for reading 9 | return $null 10 | } 11 | 12 | $bytes = $cryptoProvider.ComputeHash($stream) 13 | $checksum = '' 14 | foreach ($byte in $bytes) { 15 | $checksum += $byte.ToString('x2') 16 | } 17 | 18 | $stream.Close() | Out-Null 19 | 20 | return $checksum 21 | } 22 | 23 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) { 24 | try { 25 | $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") 26 | } 27 | catch { 28 | # _references.js file not found 29 | return 30 | } 31 | 32 | if ($referencesFileProjectItem -eq $null) { 33 | # _references.js file not found 34 | return 35 | } 36 | 37 | $referencesFilePath = $referencesFileProjectItem.FileNames(1) 38 | $referencesTempFilePath = Join-Path $env:TEMP "_references.tmp.js" 39 | 40 | if ((Select-String $referencesFilePath -pattern $fileNamePattern).Length -eq 0) { 41 | # File has no existing matching reference line 42 | # Add the full reference line to the beginning of the file 43 | "/// " | Add-Content $referencesTempFilePath -Encoding UTF8 44 | Get-Content $referencesFilePath | Add-Content $referencesTempFilePath 45 | } 46 | else { 47 | # Loop through file and replace old file name with new file name 48 | Get-Content $referencesFilePath | ForEach-Object { $_ -replace $fileNamePattern, $newFileName } > $referencesTempFilePath 49 | } 50 | 51 | # Copy over the new _references.js file 52 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 53 | Remove-Item $referencesTempFilePath -Force 54 | } 55 | 56 | function Remove-Reference($scriptsFolderProjectItem, $fileNamePattern) { 57 | try { 58 | $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") 59 | } 60 | catch { 61 | # _references.js file not found 62 | return 63 | } 64 | 65 | if ($referencesFileProjectItem -eq $null) { 66 | return 67 | } 68 | 69 | $referencesFilePath = $referencesFileProjectItem.FileNames(1) 70 | $referencesTempFilePath = Join-Path $env:TEMP "_references.tmp.js" 71 | 72 | if ((Select-String $referencesFilePath -pattern $fileNamePattern).Length -eq 1) { 73 | # Delete the line referencing the file 74 | Get-Content $referencesFilePath | ForEach-Object { if (-not ($_ -match $fileNamePattern)) { $_ } } > $referencesTempFilePath 75 | 76 | # Copy over the new _references.js file 77 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 78 | Remove-Item $referencesTempFilePath -Force 79 | } 80 | } 81 | 82 | function Delete-ProjectItem($item) { 83 | $itemDeleted = $false 84 | for ($1=1; $i -le 5; $i++) { 85 | try { 86 | $item.Delete() 87 | $itemDeleted = $true 88 | break 89 | } 90 | catch { 91 | # Try again in 200ms 92 | [System.Threading.Thread]::Sleep(200) 93 | } 94 | } 95 | if ($itemDeleted -eq $false) { 96 | throw "Unable to delete project item after five attempts." 97 | } 98 | } 99 | 100 | # Extract the version number from the jquery file in the package's content\scripts folder 101 | $packageScriptsFolder = Join-Path $installPath Content\Scripts 102 | $jqueryFileName = Join-Path $packageScriptsFolder "jquery-*.js" | Get-ChildItem -Exclude "*.min.js","*-vsdoc.js" | Split-Path -Leaf 103 | $jqueryFileNameRegEx = "jquery-((?:\d+\.)?(?:\d+\.)?(?:\d+\.)?(?:\d+)).js" 104 | $jqueryFileName -match $jqueryFileNameRegEx 105 | $ver = $matches[1] 106 | 107 | $intelliSenseFileName = "jquery-$ver.intellisense.js" 108 | 109 | # Get the project item for the scripts folder 110 | try { 111 | $scriptsFolderProjectItem = $project.ProjectItems.Item("Scripts") 112 | $projectScriptsFolderPath = $scriptsFolderProjectItem.FileNames(1) 113 | } 114 | catch { 115 | # No Scripts folder 116 | Write-Host "No scripts folder found" 117 | } -------------------------------------------------------------------------------- /GridViewNumericList/Filters/GridMvcAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Web; 6 | using System.Web.Mvc; 7 | using GridViewNumericList.Models; 8 | 9 | namespace GridViewNumericList.Filters 10 | { 11 | public class GridMvcAttribute : ActionFilterAttribute 12 | { 13 | public override void OnActionExecuted(ActionExecutedContext filterContext) 14 | { 15 | var controller = (Controller)filterContext.Controller; 16 | var rd = filterContext.RouteData; 17 | var request = filterContext.HttpContext.Request; 18 | var model = controller.ViewData.Model as IQueryable; 19 | 20 | var count = model != null ? model.Count() : 0; 21 | 22 | int pagesize, page; 23 | 24 | if (!int.TryParse(request.Params.Get("grid-page-size"), out pagesize)) 25 | pagesize = GridMvcFilter.DefaultPagesize; 26 | 27 | if (!int.TryParse(request.Params.Get("grid-page"), out page)) 28 | page = 1; 29 | 30 | var tbFilter = new GridMvcFilter 31 | { 32 | Id = rd.Values["id"] as string, 33 | Action = rd.GetRequiredString("action"), 34 | Controller = rd.GetRequiredString("controller"), 35 | GridPage = page, 36 | GridPageSize = pagesize, 37 | GridFilter = request.Params.Get("grid-filter"), 38 | GridOrd = request.Params.Get("grid-ord"), 39 | }; 40 | 41 | controller.ViewBag.ItemsPerPage = pagesize; 42 | controller.ViewBag.ListDropDown = GetListsDropDown(tbFilter, count); 43 | 44 | } 45 | private static IEnumerable GetListsDropDown(GridMvcFilter tbFilter, int max) 46 | { 47 | 48 | var itemSelected = tbFilter.GridPageSize ?? GridMvcFilter.DefaultPagesize; 49 | var list = new List(); 50 | const int defaultPageSize = GridMvcFilter.DefaultPagesize; 51 | 52 | if (max <= defaultPageSize) 53 | list.Add(new SelectListItem 54 | { 55 | Value = SetLink(tbFilter, defaultPageSize.ToString(CultureInfo.CurrentCulture)), 56 | Text = defaultPageSize.ToString(CultureInfo.CurrentCulture), 57 | Selected = true 58 | }); 59 | else 60 | { 61 | for (var i = defaultPageSize; i < max + defaultPageSize; i += defaultPageSize) 62 | { 63 | list.Add(new SelectListItem 64 | { 65 | Value = SetLink(tbFilter, i.ToString(CultureInfo.CurrentCulture)), 66 | Text = i.ToString(CultureInfo.CurrentCulture), 67 | Selected = itemSelected == i 68 | }); 69 | } 70 | } 71 | return list; 72 | } 73 | 74 | private static string SetLink(GridMvcFilter tblParams, string value) 75 | { 76 | var filter = tblParams.GridFilter != null ? tblParams.GridFilter.Split(',') : new string[] { }; 77 | 78 | var gridfilter = ""; 79 | if (filter.Length <= 0) 80 | return String.Format("/{0}{1}?grid-page={2}&grid-page-size={3}{4}{5}", 81 | tblParams.Controller, 82 | (!string.IsNullOrEmpty(tblParams.Action) ? "/" + tblParams.Action : "") + 83 | (!string.IsNullOrEmpty(tblParams.Id) ? ("/" + tblParams.Id) : ""), 84 | tblParams.GridPage, 85 | value, 86 | tblParams.GridOrd != null ? ("&grid-ord=" + tblParams.GridOrd) : "", 87 | gridfilter); 88 | 89 | gridfilter = filter.Where(item => item.Length > 0).Aggregate(gridfilter, (current, item) => current + ("&grid-filter=" + item)); 90 | 91 | return String.Format("/{0}{1}?grid-page={2}&grid-page-size={3}{4}{5}", 92 | tblParams.Controller, 93 | (!string.IsNullOrEmpty(tblParams.Action) ? "/" + tblParams.Action : "") + (!string.IsNullOrEmpty(tblParams.Id) ? ("/" + tblParams.Id) : ""), 94 | tblParams.GridPage, 95 | value, 96 | tblParams.GridOrd != null ? ("&grid-ord=" + tblParams.GridOrd) : "", 97 | gridfilter); 98 | } 99 | } 100 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.Deployment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | System.Web.WebPages.Deployment 5 | 6 | 7 | 8 | Provides a registration point for pre-application start code for Web Pages deployment. 9 | 10 | 11 | Registers pre-application start code for Web Pages deployment. 12 | 13 | 14 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Provides methods that are used to get deployment information about the Web application. 15 | 16 | 17 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the assembly path for the Web Pages deployment. 18 | The assembly path for the Web Pages deployment. 19 | The Web Pages version. 20 | 21 | 22 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the Web Pages version from the given binary path. 23 | The Web Pages version. 24 | The binary path for the Web Pages. 25 | 26 | 27 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the assembly references from the given path regardless of the Web Pages version. 28 | The dictionary containing the assembly references of the Web Pages and its version. 29 | The path to the Web Pages application. 30 | 31 | 32 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the maximum version of the Web Pages loaded assemblies. 33 | The maximum version of the Web Pages loaded assemblies. 34 | 35 | 36 | Gets the Web Pages version from the given path. 37 | The Web Pages version. 38 | The path of the root directory for the application. 39 | 40 | 41 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the Web Pages version using the configuration settings with the specified path. 42 | The Web Pages version. 43 | The path to the application settings. 44 | 45 | 46 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Returns the assemblies for this Web Pages deployment. 47 | A list containing the assemblies for this Web Pages deployment. 48 | 49 | 50 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Indicates whether the Web Pages deployment is enabled. 51 | true if the Web Pages deployment is enabled; otherwise, false. 52 | The path to the Web Pages deployment. 53 | 54 | 55 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Indicates whether the Web Pages deployment is explicitly disabled. 56 | true if the Web Pages deployment is explicitly disabled; otherwise, false. 57 | The path to the Web Pages deployment. 58 | 59 | 60 | -------------------------------------------------------------------------------- /GridViewNumericList/GridViewNumericList.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | 8 | 9 | 2.0 10 | {56430587-CE2B-489A-A19C-6A48FDED029E} 11 | {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} 12 | Library 13 | Properties 14 | GridViewNumericList 15 | GridViewNumericList 16 | v4.5 17 | true 18 | 19 | 20 | 21 | 22 | 23 | 24 | true 25 | full 26 | false 27 | bin\ 28 | DEBUG;TRACE 29 | prompt 30 | 4 31 | 32 | 33 | pdbonly 34 | true 35 | bin\ 36 | TRACE 37 | prompt 38 | 4 39 | 40 | 41 | 42 | ..\packages\Grid.Mvc.3.0.0\lib\net40\GridMvc.dll 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | ..\packages\Microsoft.AspNet.Razor.3.2.0\lib\net45\System.Web.Razor.dll 65 | 66 | 67 | ..\packages\Microsoft.AspNet.Webpages.3.2.0\lib\net45\System.Web.Webpages.dll 68 | 69 | 70 | ..\packages\Microsoft.AspNet.Webpages.3.2.0\lib\net45\System.Web.Webpages.Deployment.dll 71 | 72 | 73 | ..\packages\Microsoft.AspNet.Webpages.3.2.0\lib\net45\System.Web.Webpages.Razor.dll 74 | 75 | 76 | ..\packages\Microsoft.AspNet.Webpages.3.2.0\lib\net45\System.Web.Helpers.dll 77 | 78 | 79 | ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll 80 | 81 | 82 | ..\packages\Microsoft.AspNet.Mvc.5.2.0\lib\net45\System.Web.Mvc.dll 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | Global.asax 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | Web.config 130 | 131 | 132 | Web.config 133 | 134 | 135 | 136 | 137 | 138 | 139 | 10.0 140 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | True 150 | True 151 | 33748 152 | / 153 | http://localhost:33748/ 154 | False 155 | False 156 | 157 | 158 | False 159 | 160 | 161 | 162 | 163 | 170 | -------------------------------------------------------------------------------- /GridViewNumericList/Scripts/gridmvc.min.js: -------------------------------------------------------------------------------- 1 | window.pageGrids=window.pageGrids||{},$.fn.extend({gridmvc:function(){var n=[];return($(this).each(function(){if($(this).data("gridmvc"))n.push($(this).data("gridmvc"));else{var i={lang:$(this).attr("data-lang"),selectable:$(this).attr("data-selectable")=="true",multiplefilters:$(this).attr("data-multiplefilters")=="true"},t=new GridMvc(this,i),r=$(this).attr("data-gridname");r.length>0&&(window.pageGrids[$(this).attr("data-gridname")]=t),n.push(t),$(this).data("gridmvc",t)}}),n.length==1)?n[0]:n}}),GridMvc=function(n){function t(t,i){this.jqContainer=n(t),i=i||{},this.options=n.extend({},this.defaults(),i),this.init()}return t.prototype.init=function(){this.lang=GridMvc.lang[this.options.lang],typeof this.lang=="undefined"&&(this.lang=GridMvc.lang.en),this.events=[],this.options.selectable&&this.initGridRowsEvents(),this.filterWidgets=[],this.addFilterWidget(new TextFilterWidget),this.addFilterWidget(new NumberFilterWidget),this.addFilterWidget(new DateTimeFilterWidget),this.addFilterWidget(new BooleanFilterWidget),this.openedMenuBtn=null,this.initFilters()},t.prototype.initGridRowsEvents=function(){var n=this;this.jqContainer.on("click",".grid-row",function(){n.rowClicked.call(this,n)})},t.prototype.rowClicked=function(t){var i,r,u;t.options.selectable&&((i=n(this).closest(".grid-row"),i.length<=0)||(r={},i.find(".grid-cell").each(function(){var t=n(this).attr("data-name");t.length>0&&(r[t]=n(this).text())}),u=n.Event("RowClicked"),t.notifyOnRowSelect(r,u),u.isDefaultPrevented()||t.markRowSelected(i)))},t.prototype.markRowSelected=function(n){this.jqContainer.find(".grid-row.grid-row-selected").removeClass("grid-row-selected"),n.addClass("grid-row-selected")},t.prototype.defaults=function(){return{selectable:!0,multiplefilters:!1,lang:"en"}},t.prototype.onRowSelect=function(n){this.events.push({name:"onRowSelect",callback:n})},t.prototype.notifyOnRowSelect=function(n,t){t.row=n,this.notifyEvent("onRowSelect",t)},t.prototype.notifyEvent=function(n,t){for(var i=0;i