Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions App.razor

This file was deleted.

22 changes: 22 additions & 0 deletions Components/App.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="/" />
<link rel="stylesheet" href="bootstrap/bootstrap.min.css" />
<link rel="stylesheet" href="app.css" />
<link rel="stylesheet" href="DataGridGettingStartedSample.styles.css" />
<link rel="icon" type="image/png" href="favicon.png" />
<link href="_content/Syncfusion.Blazor.Themes/bootstrap5.css" rel="stylesheet" />
<HeadOutlet @rendermode="InteractiveServer" />
</head>

<body>
<Routes @rendermode="InteractiveServer" />
<script src="_framework/blazor.web.js"></script>
<script src="_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor.min.js" type="text/javascript"></script>
</body>

</html>
16 changes: 16 additions & 0 deletions Components/Layout/MainLayout.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@inherits LayoutComponentBase

<div class="page">

<main>
<article class="content px-4">
@Body
</article>
</main>
</div>

<div id="blazor-error-ui">
An unhandled error has occurred.
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,27 @@ main {
align-items: center;
}

.top-row ::deep a, .top-row .btn-link {
.top-row ::deep a, .top-row ::deep .btn-link {
white-space: nowrap;
margin-left: 1.5rem;
text-decoration: none;
}

.top-row a:first-child {
.top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
text-decoration: underline;
}

.top-row ::deep a:first-child {
overflow: hidden;
text-overflow: ellipsis;
}

@media (max-width: 640.98px) {
.top-row:not(.auth) {
display: none;
}

.top-row.auth {
.top-row {
justify-content: space-between;
}

.top-row a, .top-row .btn-link {
.top-row ::deep a, .top-row ::deep .btn-link {
margin-left: 0;
}
}
Expand All @@ -63,8 +64,33 @@ main {
z-index: 1;
}

.top-row.auth ::deep a:first-child {
flex: 1;
text-align: right;
width: 0;
}

.top-row, article {
padding-left: 2rem !important;
padding-right: 1.5rem !important;
}
}

#blazor-error-ui {
background: lightyellow;
bottom: 0;
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
display: none;
left: 0;
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
position: fixed;
width: 100%;
z-index: 1000;
}

#blazor-error-ui .dismiss {
cursor: pointer;
position: absolute;
right: 0.75rem;
top: 0.5rem;
}
35 changes: 35 additions & 0 deletions Components/Pages/Home.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@page "/"

<SfGrid DataSource="@Orders" AllowPaging="true" AllowSorting="true" AllowFiltering="true" AllowGrouping="true">
<GridPageSettings PageSize="10"></GridPageSettings>
<GridColumns>
<GridColumn Field="@nameof(Order.OrderID)" HeaderText="Order ID" TextAlign="TextAlign.Right" Width="120"></GridColumn>
<GridColumn Field=@nameof(Order.CustomerID) HeaderText="Customer Name" Width="150"></GridColumn>
<GridColumn Field=@nameof(Order.OrderDate) HeaderText=" Order Date" Format="d" Type="ColumnType.Date" TextAlign="TextAlign.Right" Width="130"></GridColumn>
<GridColumn Field=@nameof(Order.Freight) HeaderText="Freight" Format="C2" TextAlign="TextAlign.Right" Width="120"></GridColumn>
</GridColumns>
</SfGrid>

@code {

public List<Order>? Orders { get; set; }

protected override void OnInitialized ()
{
Orders = Enumerable.Range(1, 75).Select(x => new Order()
{
OrderID = 1000 + x,
CustomerID = (new string[] { "ALFKI", "ANANTR", "ANTON", "BLONP", "BOLID" })[new Random().Next(5)],
Freight = 2.1 * x,
OrderDate = DateTime.Now.AddDays(-x)
}).ToList();
base.OnInitialized();
}
public class Order
{
public int? OrderID { get; set; }
public string? CustomerID { get; set; }
public DateTime? OrderDate { get; set; }
public double? Freight { get; set; }
}
}
6 changes: 6 additions & 0 deletions Components/Routes.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Router AppAssembly="typeof(Program).Assembly">
<Found Context="routeData">
<RouteView RouteData="routeData" DefaultLayout="typeof(Layout.MainLayout)" />
<FocusOnNavigate RouteData="routeData" Selector="h1" />
</Found>
</Router>
7 changes: 3 additions & 4 deletions _Imports.razor → Components/_Imports.razor
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
@using System.Net.Http
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.Authorization
@using System.Net.Http.Json
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using static Microsoft.AspNetCore.Components.Web.RenderMode
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using DataGridGettingStartedSample
@using DataGridGettingStartedSample.Shared
@using Syncfusion.Blazor
@using DataGridGettingStartedSample.Components
@using Syncfusion.Blazor.Grids
13 changes: 0 additions & 13 deletions Data/WeatherForecast.cs

This file was deleted.

20 changes: 0 additions & 20 deletions Data/WeatherForecastService.cs

This file was deleted.

6 changes: 3 additions & 3 deletions DataGridGettingStartedSample.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.Blazor.Grid" Version="23.1.38" />
<PackageReference Include="Syncfusion.Blazor.Themes" Version="23.1.38" />
<PackageReference Include="Syncfusion.Blazor.Grid" Version="31.1.21" />
<PackageReference Include="Syncfusion.Blazor.Themes" Version="31.1.21" />
</ItemGroup>

</Project>
14 changes: 7 additions & 7 deletions DataGridGettingStartedSample.sln
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33213.308
VisualStudioVersion = 17.13.35825.156 d17.13
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataGridGettingStartedSample", "DataGridGettingStartedSample.csproj", "{BA2DB676-AD79-4B16-9DFD-897E194FDFB3}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataGridGettingStartedSample", "DataGridGettingStartedSample.csproj", "{1551A021-CDCC-4C28-8169-3C7D6FDDE5A0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BA2DB676-AD79-4B16-9DFD-897E194FDFB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BA2DB676-AD79-4B16-9DFD-897E194FDFB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BA2DB676-AD79-4B16-9DFD-897E194FDFB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BA2DB676-AD79-4B16-9DFD-897E194FDFB3}.Release|Any CPU.Build.0 = Release|Any CPU
{1551A021-CDCC-4C28-8169-3C7D6FDDE5A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1551A021-CDCC-4C28-8169-3C7D6FDDE5A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1551A021-CDCC-4C28-8169-3C7D6FDDE5A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1551A021-CDCC-4C28-8169-3C7D6FDDE5A0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A0C9D82D-A591-4419-A154-53EFF9F2E31A}
SolutionGuid = {FE891BA9-482E-452A-8231-F17225C10BBD}
EndGlobalSection
EndGlobal
18 changes: 0 additions & 18 deletions Pages/Counter.razor

This file was deleted.

42 changes: 0 additions & 42 deletions Pages/Error.cshtml

This file was deleted.

27 changes: 0 additions & 27 deletions Pages/Error.cshtml.cs

This file was deleted.

Loading