Skip to content

Commit 12c47ad

Browse files
Sample modified
1 parent c6a0403 commit 12c47ad

File tree

5 files changed

+31
-2
lines changed

5 files changed

+31
-2
lines changed
Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,28 @@
11
@page "/"
22

3+
@using Syncfusion.Blazor
4+
@using Syncfusion.Blazor.Grids
5+
36
<PageTitle>Home</PageTitle>
47

5-
<h1>Hello, world!</h1>
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; }
626

7-
Welcome to your new app.
27+
}
28+
}

WASM with Global and None/WASM with Global and None/Components/App.razor

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<link rel="stylesheet" href="app.css" />
1010
<link rel="stylesheet" href="WASM with Global and None.styles.css" />
1111
<link rel="icon" type="image/png" href="favicon.png" />
12+
<link rel="stylesheet" href="_content/Syncfusion.Blazor.Themes/bootstrap5.css" />
13+
<script type="text/javascript" src="_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor.min.js"></script>
1214
<HeadOutlet @rendermode="@InteractiveWebAssembly" />
1315
</head>
1416

WASM with Global and None/WASM with Global and None/Components/_Imports.razor

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@
99
@using WASM_with_Global_and_None
1010
@using WASM_with_Global_and_None.Client
1111
@using WASM_with_Global_and_None.Components
12+
@using Syncfusion.Blazor
13+
@using Syncfusion.Blazor.Grids

WASM with Global and None/WASM with Global and None/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
using WASM_with_Global_and_None.Client.Pages;
22
using WASM_with_Global_and_None.Components;
3+
using Syncfusion.Blazor;
34

45
var builder = WebApplication.CreateBuilder(args);
56

67
// Add services to the container.
78
builder.Services.AddRazorComponents()
89
.AddInteractiveWebAssemblyComponents();
10+
builder.Services.AddSyncfusionBlazor();
911

1012
var app = builder.Build();
1113

WASM with Global and None/WASM with Global and None/WASM with Global and None.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
<ItemGroup>
1212
<ProjectReference Include="..\WASM with Global and None.Client\WASM with Global and None.Client.csproj" />
1313
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.0" />
14+
<PackageReference Include="Syncfusion.Blazor.Grid" Version="23.1.44" />
15+
<PackageReference Include="Syncfusion.Blazor.Themes" Version="23.1.44" />
1416
</ItemGroup>
1517

1618
</Project>

0 commit comments

Comments
 (0)