Skip to content

Commit a6fe901

Browse files
committed
GridVIew
1 parent c564009 commit a6fe901

File tree

116 files changed

+40216
-16
lines changed

Some content is hidden

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

116 files changed

+40216
-16
lines changed

BlazorMeetsWebForms.sln

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWebFormsComponents",
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{240E45D9-B9FF-42E8-B0C1-332861E02DBF}"
99
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BeforeWebForms", "samples\BeforeWebForms\BeforeWebForms.csproj", "{CA277C6F-A3DD-4FAF-9B7C-56E7B844CEF7}"
11-
EndProject
1210
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{FD758025-7F6D-4EE8-9837-98C0E0BFCB6B}"
1311
EndProject
1412
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWebFormsComponents.Test", "src\BlazorWebFormsComponents.Test\BlazorWebFormsComponents.Test.csproj", "{70EC4DF2-FE9B-49F4-B385-040E45BC7764}"
@@ -43,6 +41,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "watch", "watch", "{A4769DEE
4341
scripts\watch.csproj = scripts\watch.csproj
4442
scripts\watchtest = scripts\watchtest
4543
EndProjectSection
44+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BeforeWebForms2", "samples\BeforeWebForms2\BeforeWebForms2.csproj", "{F3C9E926-380D-4363-9705-792C8BAF9E75}"
4645
EndProject
4746
Global
4847
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -66,18 +65,6 @@ Global
6665
{7E35A14A-C0EF-4705-B892-F1704ECC6B31}.Release|x64.Build.0 = Release|Any CPU
6766
{7E35A14A-C0EF-4705-B892-F1704ECC6B31}.Release|x86.ActiveCfg = Release|Any CPU
6867
{7E35A14A-C0EF-4705-B892-F1704ECC6B31}.Release|x86.Build.0 = Release|Any CPU
69-
{CA277C6F-A3DD-4FAF-9B7C-56E7B844CEF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
70-
{CA277C6F-A3DD-4FAF-9B7C-56E7B844CEF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
71-
{CA277C6F-A3DD-4FAF-9B7C-56E7B844CEF7}.Debug|x64.ActiveCfg = Debug|Any CPU
72-
{CA277C6F-A3DD-4FAF-9B7C-56E7B844CEF7}.Debug|x64.Build.0 = Debug|Any CPU
73-
{CA277C6F-A3DD-4FAF-9B7C-56E7B844CEF7}.Debug|x86.ActiveCfg = Debug|Any CPU
74-
{CA277C6F-A3DD-4FAF-9B7C-56E7B844CEF7}.Debug|x86.Build.0 = Debug|Any CPU
75-
{CA277C6F-A3DD-4FAF-9B7C-56E7B844CEF7}.Release|Any CPU.ActiveCfg = Release|Any CPU
76-
{CA277C6F-A3DD-4FAF-9B7C-56E7B844CEF7}.Release|Any CPU.Build.0 = Release|Any CPU
77-
{CA277C6F-A3DD-4FAF-9B7C-56E7B844CEF7}.Release|x64.ActiveCfg = Release|Any CPU
78-
{CA277C6F-A3DD-4FAF-9B7C-56E7B844CEF7}.Release|x64.Build.0 = Release|Any CPU
79-
{CA277C6F-A3DD-4FAF-9B7C-56E7B844CEF7}.Release|x86.ActiveCfg = Release|Any CPU
80-
{CA277C6F-A3DD-4FAF-9B7C-56E7B844CEF7}.Release|x86.Build.0 = Release|Any CPU
8168
{70EC4DF2-FE9B-49F4-B385-040E45BC7764}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
8269
{70EC4DF2-FE9B-49F4-B385-040E45BC7764}.Debug|Any CPU.Build.0 = Debug|Any CPU
8370
{70EC4DF2-FE9B-49F4-B385-040E45BC7764}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -126,16 +113,28 @@ Global
126113
{1669CD22-5CCE-4D96-A02B-31D81B5EFB2B}.Release|x64.Build.0 = Release|Any CPU
127114
{1669CD22-5CCE-4D96-A02B-31D81B5EFB2B}.Release|x86.ActiveCfg = Release|Any CPU
128115
{1669CD22-5CCE-4D96-A02B-31D81B5EFB2B}.Release|x86.Build.0 = Release|Any CPU
116+
{F3C9E926-380D-4363-9705-792C8BAF9E75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
117+
{F3C9E926-380D-4363-9705-792C8BAF9E75}.Debug|Any CPU.Build.0 = Debug|Any CPU
118+
{F3C9E926-380D-4363-9705-792C8BAF9E75}.Debug|x64.ActiveCfg = Debug|Any CPU
119+
{F3C9E926-380D-4363-9705-792C8BAF9E75}.Debug|x64.Build.0 = Debug|Any CPU
120+
{F3C9E926-380D-4363-9705-792C8BAF9E75}.Debug|x86.ActiveCfg = Debug|Any CPU
121+
{F3C9E926-380D-4363-9705-792C8BAF9E75}.Debug|x86.Build.0 = Debug|Any CPU
122+
{F3C9E926-380D-4363-9705-792C8BAF9E75}.Release|Any CPU.ActiveCfg = Release|Any CPU
123+
{F3C9E926-380D-4363-9705-792C8BAF9E75}.Release|Any CPU.Build.0 = Release|Any CPU
124+
{F3C9E926-380D-4363-9705-792C8BAF9E75}.Release|x64.ActiveCfg = Release|Any CPU
125+
{F3C9E926-380D-4363-9705-792C8BAF9E75}.Release|x64.Build.0 = Release|Any CPU
126+
{F3C9E926-380D-4363-9705-792C8BAF9E75}.Release|x86.ActiveCfg = Release|Any CPU
127+
{F3C9E926-380D-4363-9705-792C8BAF9E75}.Release|x86.Build.0 = Release|Any CPU
129128
EndGlobalSection
130129
GlobalSection(SolutionProperties) = preSolution
131130
HideSolutionNode = FALSE
132131
EndGlobalSection
133132
GlobalSection(NestedProjects) = preSolution
134-
{CA277C6F-A3DD-4FAF-9B7C-56E7B844CEF7} = {240E45D9-B9FF-42E8-B0C1-332861E02DBF}
135133
{70EC4DF2-FE9B-49F4-B385-040E45BC7764} = {FD758025-7F6D-4EE8-9837-98C0E0BFCB6B}
136134
{6C602B37-5FC9-43FF-A3D8-C92B42D62F0D} = {240E45D9-B9FF-42E8-B0C1-332861E02DBF}
137135
{7218D3E2-38BD-429D-9D84-15E688BDC4A1} = {240E45D9-B9FF-42E8-B0C1-332861E02DBF}
138136
{1669CD22-5CCE-4D96-A02B-31D81B5EFB2B} = {240E45D9-B9FF-42E8-B0C1-332861E02DBF}
137+
{F3C9E926-380D-4363-9705-792C8BAF9E75} = {240E45D9-B9FF-42E8-B0C1-332861E02DBF}
139138
EndGlobalSection
140139
GlobalSection(ExtensibilityGlobals) = postSolution
141140
SolutionGuid = {E288F9FB-039F-4718-8AEB-85F89B29EB4E}

samples/AfterBlazorServerSide/Pages/ComponentList.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<li>DataPager </li>
99
<li>DetailsView </li>
1010
<li>FormView </li>
11-
<li>GridView </li>
11+
<li><a href="/ControlSamples/GridView/Default">GridView</a></li>
1212
<li><a href="/ControlSamples/ListView">ListView</a></li>
1313
<li><a href="/ControlSamples/Repeater">Repeater</a></li>
1414

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
6+
namespace AfterBlazorServerSide.Pages.ControlSamples.GridView
7+
{
8+
public class Customer
9+
{
10+
public int CustomerID { get; set; }
11+
12+
public string FirstName { get; set; }
13+
14+
public string LastName { get; set; }
15+
16+
public string CompanyName { get; set; }
17+
}
18+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
@page "/ControlSamples/GridView/Default"
2+
3+
<h2>GridView Default Example</h2>
4+
5+
<GridView ItemType="Customer" DataKeyNames="CustomerID" SelectMethod="GetCustomers">
6+
<Columns>
7+
<BoundField DataField="CustomerID" HeaderText="ID" ItemType="Customer" />
8+
<BoundField DataField="CompanyName" HeaderText="CompanyName" ItemType="Customer" />
9+
<BoundField DataField="FirstName" HeaderText="FirstName" ItemType="Customer" />
10+
<BoundField DataField="LastName" HeaderText="LastName" ItemType="Customer" />
11+
<TemplateField ItemType="Customer">
12+
<ItemTemplate Context="Item">
13+
<button type="button">Click Me!</button>
14+
</ItemTemplate>
15+
</TemplateField>
16+
</Columns>
17+
</GridView>
18+
19+
@code{
20+
public IQueryable<Customer> GetCustomers(int maxRows, int startRowIndex, string sortByExpression, out int totalRowCount)
21+
{
22+
var customers = new List<Customer>();
23+
var c1 = new Customer
24+
{
25+
CustomerID = 1,
26+
FirstName = "John",
27+
LastName = "Smith",
28+
CompanyName = "Virus"
29+
};
30+
31+
var c2 = new Customer
32+
{
33+
CustomerID = 2,
34+
FirstName = "Jose",
35+
LastName = "Rodriguez",
36+
CompanyName = "Boring"
37+
};
38+
39+
40+
var c3 = new Customer
41+
{
42+
CustomerID = 3,
43+
FirstName = "Jason",
44+
LastName = "Ramirez",
45+
CompanyName = "Fun Machines"
46+
};
47+
48+
customers.Add(c1);
49+
customers.Add(c2);
50+
customers.Add(c3);
51+
52+
totalRowCount = customers.Count();
53+
return customers.AsQueryable();
54+
}
55+
}

samples/AfterBlazorServerSide/Pages/ControlSamples/_Imports.razor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@using BlazorWebFormsComponents
2+
@using BlazorWebFormsComponents.GridView
23
@using SharedSampleObjects.Models
34

45
@using static BlazorWebFormsComponents.Enums.RepeatLayout
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.Optimization;
6+
using System.Web.UI;
7+
8+
namespace BeforeWebForms
9+
{
10+
public class BundleConfig
11+
{
12+
// For more information on Bundling, visit https://go.microsoft.com/fwlink/?LinkID=303951
13+
public static void RegisterBundles(BundleCollection bundles)
14+
{
15+
bundles.Add(new ScriptBundle("~/bundles/WebFormsJs").Include(
16+
"~/Scripts/WebForms/WebForms.js",
17+
"~/Scripts/WebForms/WebUIValidation.js",
18+
"~/Scripts/WebForms/MenuStandards.js",
19+
"~/Scripts/WebForms/Focus.js",
20+
"~/Scripts/WebForms/GridView.js",
21+
"~/Scripts/WebForms/DetailsView.js",
22+
"~/Scripts/WebForms/TreeView.js",
23+
"~/Scripts/WebForms/WebParts.js"));
24+
25+
// Order is very important for these files to work, they have explicit dependencies
26+
bundles.Add(new ScriptBundle("~/bundles/MsAjaxJs").Include(
27+
"~/Scripts/WebForms/MsAjax/MicrosoftAjax.js",
28+
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxApplicationServices.js",
29+
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxTimer.js",
30+
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxWebForms.js"));
31+
32+
// Use the Development version of Modernizr to develop with and learn from. Then, when you’re
33+
// ready for production, use the build tool at https://modernizr.com to pick only the tests you need
34+
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
35+
"~/Scripts/modernizr-*"));
36+
}
37+
}
38+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Web;
4+
using System.Web.Routing;
5+
using Microsoft.AspNet.FriendlyUrls;
6+
7+
namespace BeforeWebForms
8+
{
9+
public static class RouteConfig
10+
{
11+
public static void RegisterRoutes(RouteCollection routes)
12+
{
13+
var settings = new FriendlyUrlSettings();
14+
settings.AutoRedirectMode = RedirectMode.Permanent;
15+
routes.EnableFriendlyUrls(settings);
16+
}
17+
}
18+
}

0 commit comments

Comments
 (0)