Skip to content

Commit a03b50b

Browse files
committed
Update the project
1 parent 95c965e commit a03b50b

24 files changed

+140
-148
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Syncfusion.Blazor.PivotTable" Version="20.1.0.48" />
11-
<PackageReference Include="Syncfusion.Blazor.Themes" Version="20.1.0.48" />
10+
<PackageReference Include="Syncfusion.Blazor.Grid" Version="23.1.44" />
11+
<PackageReference Include="Syncfusion.Blazor.PivotTable" Version="23.1.44" />
12+
<PackageReference Include="Syncfusion.Blazor.Themes" Version="23.1.44" />
1213
</ItemGroup>
1314

1415
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
4-
VisualStudioVersion = 17.1.32104.313
4+
VisualStudioVersion = 17.4.33213.308
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorApp4", "BlazorApp4.csproj", "{D975B9C1-7D60-4918-93E1-7E8BDE0B6600}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomizingCellValue", "CustomizingCellValue.csproj", "{39F00B9C-151F-4323-BBCF-BCE667F15A1C}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1010
Debug|Any CPU = Debug|Any CPU
1111
Release|Any CPU = Release|Any CPU
1212
EndGlobalSection
1313
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{D975B9C1-7D60-4918-93E1-7E8BDE0B6600}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15-
{D975B9C1-7D60-4918-93E1-7E8BDE0B6600}.Debug|Any CPU.Build.0 = Debug|Any CPU
16-
{D975B9C1-7D60-4918-93E1-7E8BDE0B6600}.Release|Any CPU.ActiveCfg = Release|Any CPU
17-
{D975B9C1-7D60-4918-93E1-7E8BDE0B6600}.Release|Any CPU.Build.0 = Release|Any CPU
14+
{39F00B9C-151F-4323-BBCF-BCE667F15A1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{39F00B9C-151F-4323-BBCF-BCE667F15A1C}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{39F00B9C-151F-4323-BBCF-BCE667F15A1C}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{39F00B9C-151F-4323-BBCF-BCE667F15A1C}.Release|Any CPU.Build.0 = Release|Any CPU
1818
EndGlobalSection
1919
GlobalSection(SolutionProperties) = preSolution
2020
HideSolutionNode = FALSE
2121
EndGlobalSection
2222
GlobalSection(ExtensibilityGlobals) = postSolution
23-
SolutionGuid = {57A07A83-0B45-4E22-ACB5-4F5C529A0012}
23+
SolutionGuid = {B0C5488F-9849-4743-9E6C-8AB2236F9318}
2424
EndGlobalSection
2525
EndGlobal

Data/WeatherForecast.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
namespace BlazorApp4.Data
1+
namespace CustomizingCellValue.Data
22
{
33
public class WeatherForecast
44
{
5-
public DateTime Date { get; set; }
5+
public DateOnly Date { get; set; }
66

77
public int TemperatureC { get; set; }
88

Data/WeatherForecastService.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace BlazorApp4.Data
1+
namespace CustomizingCellValue.Data
22
{
33
public class WeatherForecastService
44
{
@@ -7,7 +7,7 @@ public class WeatherForecastService
77
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
88
};
99

10-
public Task<WeatherForecast[]> GetForecastAsync(DateTime startDate)
10+
public Task<WeatherForecast[]> GetForecastAsync(DateOnly startDate)
1111
{
1212
return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast
1313
{

Pages/Error.cshtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@page
2-
@model BlazorApp4.Pages.ErrorModel
2+
@model CustomizingCellValue.Pages.ErrorModel
33

44
<!DOCTYPE html>
55
<html lang="en">

Pages/Error.cshtml.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using Microsoft.AspNetCore.Mvc.RazorPages;
33
using System.Diagnostics;
44

5-
namespace BlazorApp4.Pages
5+
namespace CustomizingCellValue.Pages
66
{
77
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
88
[IgnoreAntiforgeryToken]

Pages/FetchData.razor

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
@page "/fetchdata"
2+
@using CustomizingCellValue.Data
3+
@inject WeatherForecastService ForecastService
24

35
<PageTitle>Weather forecast</PageTitle>
46

5-
@using BlazorApp4.Data
6-
@inject WeatherForecastService ForecastService
7-
87
<h1>Weather forecast</h1>
98

109
<p>This component demonstrates fetching data from a service.</p>
@@ -43,6 +42,6 @@ else
4342

4443
protected override async Task OnInitializedAsync()
4544
{
46-
forecasts = await ForecastService.GetForecastAsync(DateTime.Now);
45+
forecasts = await ForecastService.GetForecastAsync(DateOnly.FromDateTime(DateTime.Now));
4746
}
4847
}

Pages/Index.razor

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<SfButton OnClick="@OnClick" IsPrimary="true">Export To Excel</SfButton>
88

99
<SfPivotView @ref="Pivot" TValue="ProductDetails" Width="100%" Height="100%" AllowExcelExport="true">
10-
<PivotViewTemplates>
10+
<PivotViewTemplates>
1111
<CellTemplate>
1212
@{
1313
var data = (context as AxisSet);
@@ -39,11 +39,11 @@
3939
<PivotViewValue Name="Amount" Caption="Sold Amount"></PivotViewValue>
4040
</PivotViewValues>
4141
</PivotViewDataSourceSettings>
42-
<PivotViewEvents TValue="ProductDetails" ExcelQueryCellInfo="ExcelQueryCellInfo"/>
42+
<PivotViewEvents TValue="ProductDetails" ExcelQueryCellInfo="ExcelQueryCellInfo" />
4343
</SfPivotView>
44-
@code{
44+
@code {
4545
public List<ProductDetails> dataSource { get; set; }
46-
public SfPivotView<ProductDetails> Pivot {get; set; }
46+
public SfPivotView<ProductDetails> Pivot { get; set; }
4747
public int Count { get; set; } = 1000;
4848

4949
protected override void OnInitialized()
@@ -53,13 +53,13 @@
5353

5454
public void ExcelQueryCellInfo(ExcelQueryCellInfoEventArgs<ProductDetails> args)
5555
{
56-
if(args.Column.Index > 0)
56+
if (args.Column.Index > 0)
5757
{
58-
if(Convert.ToInt32(args.Value) > 1000)
58+
if (Convert.ToInt32(args.Value) > 1000)
5959
{
6060
args.Cell.Value = "Completed";
6161
}
62-
else if(Convert.ToInt32(args.Value) < 1000)
62+
else if (Convert.ToInt32(args.Value) < 1000)
6363
{
6464
args.Cell.Value = "Pending";
6565
}

Pages/_Host.cshtml

+33-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,36 @@
11
@page "/"
2-
@namespace BlazorApp4.Pages
2+
@using Microsoft.AspNetCore.Components.Web
3+
@namespace CustomizingCellValue.Pages
34
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
4-
@{
5-
Layout = "_Layout";
6-
}
75

8-
<component type="typeof(App)" render-mode="ServerPrerendered" />
6+
<!DOCTYPE html>
7+
<html lang="en">
8+
<head>
9+
<meta charset="utf-8" />
10+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
11+
<base href="~/" />
12+
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
13+
<link href="css/site.css" rel="stylesheet" />
14+
<link href="CustomizingCellValue.styles.css" rel="stylesheet" />
15+
<link rel="icon" type="image/png" href="favicon.png"/>
16+
<link href="_content/Syncfusion.Blazor.Themes/bootstrap5.css" rel="stylesheet" />
17+
<script src="_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor.min.js" type="text/javascript"></script>
18+
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" />
19+
</head>
20+
<body>
21+
<component type="typeof(App)" render-mode="ServerPrerendered" />
22+
23+
<div id="blazor-error-ui">
24+
<environment include="Staging,Production">
25+
An error has occurred. This application may no longer respond until reloaded.
26+
</environment>
27+
<environment include="Development">
28+
An unhandled exception has occurred. See browser dev tools for details.
29+
</environment>
30+
<a href="" class="reload">Reload</a>
31+
<a class="dismiss">🗙</a>
32+
</div>
33+
34+
<script src="_framework/blazor.server.js"></script>
35+
</body>
36+
</html>

Pages/_Layout.cshtml

-33
This file was deleted.

Program.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using BlazorApp4.Data;
1+
using CustomizingCellValue.Data;
22
using Microsoft.AspNetCore.Components;
33
using Microsoft.AspNetCore.Components.Web;
44
using Syncfusion.Blazor;
@@ -8,8 +8,8 @@
88
// Add services to the container.
99
builder.Services.AddRazorPages();
1010
builder.Services.AddServerSideBlazor();
11+
builder.Services.AddSyncfusionBlazor();
1112
builder.Services.AddSingleton<WeatherForecastService>();
12-
builder.Services.AddSyncfusionBlazor(options => { options.IgnoreScriptIsolation = false; });
1313

1414
var app = builder.Build();
1515

Properties/launchSettings.json

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"iisSettings": {
3+
"windowsAuthentication": false,
4+
"anonymousAuthentication": true,
5+
"iisExpress": {
6+
"applicationUrl": "http://localhost:9661",
7+
"sslPort": 44323
8+
}
9+
},
10+
"profiles": {
11+
"http": {
12+
"commandName": "Project",
13+
"dotnetRunMessages": true,
14+
"launchBrowser": true,
15+
"applicationUrl": "http://localhost:5038",
16+
"environmentVariables": {
17+
"ASPNETCORE_ENVIRONMENT": "Development"
18+
}
19+
},
20+
"https": {
21+
"commandName": "Project",
22+
"dotnetRunMessages": true,
23+
"launchBrowser": true,
24+
"applicationUrl": "https://localhost:7272;http://localhost:5038",
25+
"environmentVariables": {
26+
"ASPNETCORE_ENVIRONMENT": "Development"
27+
}
28+
},
29+
"IIS Express": {
30+
"commandName": "IISExpress",
31+
"launchBrowser": true,
32+
"environmentVariables": {
33+
"ASPNETCORE_ENVIRONMENT": "Development"
34+
}
35+
}
36+
}
37+
}

Shared/MainLayout.razor

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@inherits LayoutComponentBase
22

3-
<PageTitle>BlazorApp4</PageTitle>
3+
<PageTitle>CustomizingCellValue</PageTitle>
44

55
<div class="page">
66
<div class="sidebar">

Shared/MainLayout.razor.css

-70
This file was deleted.

Shared/NavMenu.razor

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<div class="top-row ps-3 navbar navbar-dark">
22
<div class="container-fluid">
3-
<a class="navbar-brand" href="">BlazorApp4</a>
3+
<a class="navbar-brand" href="">CustomizingCellValue</a>
44
<button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
55
<span class="navbar-toggler-icon"></span>
66
</button>
77
</div>
88
</div>
99

10-
<div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
10+
<div class="@NavMenuCssClass nav-scrollable" @onclick="ToggleNavMenu">
1111
<nav class="flex-column">
1212
<div class="nav-item px-3">
1313
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">

Shared/NavMenu.razor.css

+6
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,10 @@
5959
/* Never collapse the sidebar for wide screens */
6060
display: block;
6161
}
62+
63+
.nav-scrollable {
64+
/* Allow sidebar to scroll for tall menus */
65+
height: calc(100vh - 3.5rem);
66+
overflow-y: auto;
67+
}
6268
}

0 commit comments

Comments
 (0)