Skip to content

Commit db7186b

Browse files
"WASM with Per Page and Individual" sample modified
1 parent 00f38b4 commit db7186b

File tree

7 files changed

+39
-8
lines changed

7 files changed

+39
-8
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
@page "/"
2+
@rendermode InteractiveWebAssembly
3+
4+
@using Syncfusion.Blazor.Grids
5+
6+
<PageTitle>Home</PageTitle>
7+
8+
<SfGrid DataSource="@Orders" AllowPaging="true" AllowSorting="true" AllowFiltering="true" AllowGrouping="true" />
9+
10+
@code {
11+
public List<Order> Orders { get; set; }
12+
13+
protected override void OnInitialized()
14+
{
15+
Orders = Enumerable.Range(1, 50).Select(x => new Order()
16+
{
17+
OrderID = 0 + x,
18+
CustomerID = (new string[] { "ALFKI", "ANANTR", "ANTON", "BLONP", "BOLID" })[new Random().Next(5)],
19+
}).ToList();
20+
}
21+
22+
public class Order
23+
{
24+
public int? OrderID { get; set; }
25+
public string CustomerID { get; set; }
26+
27+
}
28+
}

WASM with Per Page and Individual/WASM with Per Page and Individual.Client/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
using Microsoft.AspNetCore.Components.Authorization;
22
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
33
using WASM_with_Per_Page_and_Individual.Client;
4+
using Syncfusion.Blazor;
45

56
var builder = WebAssemblyHostBuilder.CreateDefault(args);
67

8+
builder.Services.AddSyncfusionBlazor();
79
builder.Services.AddAuthorizationCore();
810
builder.Services.AddCascadingAuthenticationState();
911
builder.Services.AddSingleton<AuthenticationStateProvider, PersistentAuthenticationStateProvider>();

WASM with Per Page and Individual/WASM with Per Page and Individual.Client/WASM with Per Page and Individual.Client.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
1515
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="8.0.0" />
16+
<PackageReference Include="Syncfusion.Blazor.Themes" Version="23.2.4" />
17+
<PackageReference Include="Syncfusion.Blazor.Grid" Version="23.2.4" />
1618
</ItemGroup>
1719

1820
</Project>

WASM with Per Page and Individual/WASM with Per Page and Individual.Client/_Imports.razor

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@
88
@using Microsoft.AspNetCore.Components.Web.Virtualization
99
@using Microsoft.JSInterop
1010
@using WASM_with_Per_Page_and_Individual.Client
11+
@using Syncfusion.Blazor
12+
@using Syncfusion.Blazor.Grids

WASM with Per Page and Individual/WASM with Per Page and Individual/Components/App.razor

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77
<base href="/" />
88
<link rel="stylesheet" href="bootstrap/bootstrap.min.css" />
99
<link rel="stylesheet" href="app.css" />
10-
<link rel="stylesheet" href="WASM with Per Page and Individual.styles.css" />
10+
@* <link rel="stylesheet" href="WASM with Per Page and Individual.styles.css" /> *@
1111
<link rel="icon" type="image/png" href="favicon.png" />
12+
<link rel="stylesheet" href="_content/Syncfusion.Blazor.Themes/bootstrap5.css" />
1213
<HeadOutlet />
1314
</head>
1415

1516
<body>
1617
<Routes />
1718
<script src="_framework/blazor.web.js"></script>
19+
<script src="_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor.min.js"></script>
1820
</body>
1921

2022
</html>

WASM with Per Page and Individual/WASM with Per Page and Individual/Components/Pages/Home.razor

Lines changed: 0 additions & 7 deletions
This file was deleted.

WASM with Per Page and Individual/WASM with Per Page and Individual/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
using WASM_with_Per_Page_and_Individual.Components;
66
using WASM_with_Per_Page_and_Individual.Components.Account;
77
using WASM_with_Per_Page_and_Individual.Data;
8+
using Syncfusion.Blazor;
89

910
var builder = WebApplication.CreateBuilder(args);
1011

1112
// Add services to the container.
1213
builder.Services.AddRazorComponents()
1314
.AddInteractiveWebAssemblyComponents();
1415

16+
builder.Services.AddSyncfusionBlazor();
1517
builder.Services.AddCascadingAuthenticationState();
1618
builder.Services.AddScoped<IdentityUserAccessor>();
1719
builder.Services.AddScoped<IdentityRedirectManager>();

0 commit comments

Comments
 (0)